improve coverage, remove infection
All checks were successful
/ ls (pull_request) Successful in 1m30s
All checks were successful
/ ls (pull_request) Successful in 1m30s
This commit is contained in:
parent
eaa723a58b
commit
0aa25d107b
10 changed files with 160 additions and 1317 deletions
|
@ -9,6 +9,7 @@ use Override;
|
|||
|
||||
use function sprintf;
|
||||
|
||||
|
||||
final class FoodVendorControllerTest extends DbWebTest
|
||||
{
|
||||
private string $path = '/food/vendor/';
|
||||
|
@ -23,15 +24,20 @@ final class FoodVendorControllerTest extends DbWebTest
|
|||
|
||||
public function testNew(): void
|
||||
{
|
||||
self::assertSame(0, $this->repository->count([]));
|
||||
$this->client->request('GET', sprintf('%snew', $this->path));
|
||||
|
||||
self::assertResponseStatusCodeSame(200);
|
||||
|
||||
$this->client->submitForm('Save', [
|
||||
'food_vendor[name]' => 'Testing',
|
||||
'food_vendor[name]' => 'TestingNew',
|
||||
]);
|
||||
|
||||
$newVendor = $this->repository->findOneBy(['name' => 'TestingNew']);
|
||||
$this->assertInstanceof(FoodVendor::class, $newVendor);
|
||||
self::assertSame(1, $this->repository->count([]));
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function testShow(): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue