1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

Quick run through of applying new test entity helper class

This commit is contained in:
Dan Brown
2022-09-29 22:11:16 +01:00
parent b56f7355aa
commit 900e853b15
47 changed files with 198 additions and 286 deletions

View File

@@ -24,8 +24,7 @@ class ConvertTest extends TestCase
public function test_convert_chapter_to_book()
{
/** @var Chapter $chapter */
$chapter = Chapter::query()->whereHas('pages')->first();
$chapter = $this->entities->chapterHasPages();
$chapter->tags()->save(new Tag(['name' => 'Category', 'value' => 'Penguins']));
/** @var Page $childPage */
$childPage = $chapter->pages()->first();