improve coverage, remove infection
All checks were successful
/ ls (pull_request) Successful in 1m30s

This commit is contained in:
lubiana 2025-01-26 11:48:16 +01:00
parent eaa723a58b
commit 0aa25d107b
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
10 changed files with 160 additions and 1317 deletions

View file

@ -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