From 63638c2236e0487dfa6070ec26f5eca2e97ab38c Mon Sep 17 00:00:00 2001 From: myrmidex Date: Tue, 2 Jun 2026 22:29:21 +0000 Subject: [PATCH] Split integration tests --- tests/Integration/Subject/AddSubjectTest.php | 12 ----------- .../Integration/Subject/ListSubjectsTest.php | 20 +++++++++++++++++++ 2 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 tests/Integration/Subject/ListSubjectsTest.php diff --git a/tests/Integration/Subject/AddSubjectTest.php b/tests/Integration/Subject/AddSubjectTest.php index 7885f62..17a8de7 100644 --- a/tests/Integration/Subject/AddSubjectTest.php +++ b/tests/Integration/Subject/AddSubjectTest.php @@ -3,23 +3,11 @@ namespace App\Tests\Integration\Subject; use App\Entity\Restaurant; -use App\Factory\RestaurantFactory; use App\Repository\SubjectRepository; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class AddSubjectTest extends WebTestCase { - public function testSubjectList(): void - { - $client = static::createClient(); - - $subject = RestaurantFactory::createOne(); - - $client->request('GET', '/'); - - $this->assertSelectorTextContains('ul li', $subject->getName()); - } - public function testAddingNewSubject(): void { $client = static::createClient(); diff --git a/tests/Integration/Subject/ListSubjectsTest.php b/tests/Integration/Subject/ListSubjectsTest.php new file mode 100644 index 0000000..b2f92d9 --- /dev/null +++ b/tests/Integration/Subject/ListSubjectsTest.php @@ -0,0 +1,20 @@ +request('GET', '/'); + + $this->assertSelectorTextContains('ul li', $subject->getName()); + } +}