Split integration tests
This commit is contained in:
parent
cc213bfb15
commit
63638c2236
2 changed files with 20 additions and 12 deletions
|
|
@ -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();
|
||||
|
|
|
|||
20
tests/Integration/Subject/ListSubjectsTest.php
Normal file
20
tests/Integration/Subject/ListSubjectsTest.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace App\Tests\Integration\Subject;
|
||||
|
||||
use App\Factory\RestaurantFactory;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class ListSubjectsTest extends WebTestCase
|
||||
{
|
||||
public function testSubjectList(): void
|
||||
{
|
||||
$client = static::createClient();
|
||||
|
||||
$subject = RestaurantFactory::createOne();
|
||||
|
||||
$client->request('GET', '/');
|
||||
|
||||
$this->assertSelectorTextContains('ul li', $subject->getName());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue