diff --git a/tests/Controller/MenuItemControllerTest.php b/tests/Controller/MenuItemControllerTest.php index b3b799e..4d6dd02 100644 --- a/tests/Controller/MenuItemControllerTest.php +++ b/tests/Controller/MenuItemControllerTest.php @@ -87,8 +87,9 @@ final class MenuItemControllerTest extends DbWebTest $this->manager->persist($this->vendor); $this->manager->persist($menuItem); - $order = new FoodOrder(); + $order = new FoodOrder; $order->setFoodVendor($this->vendor); + $this->manager->persist($order); $this->manager->flush(); $this->assertFalse($menuItem->isDeleted()); @@ -101,7 +102,9 @@ final class MenuItemControllerTest extends DbWebTest $this->assertTrue($menuItem->isDeleted()); $crawler = $this->client->request('GET', '/order/item/new/' . $order->getId()); - $count = $crawler->filter('body > main:nth-child(2) > div:nth-child(5)')->children()->count(); + $count = $crawler->filter('body > main:nth-child(2) > div:nth-child(5)') + ->children() + ->count(); $this->assertSame(0, $count); $this->assertResponseIsSuccessful();