Fixed all phpstan inspections on tests

This commit is contained in:
Alejandro Celaya
2022-10-24 20:11:25 +02:00
parent 1650499a38
commit 85e18a4754
10 changed files with 36 additions and 19 deletions

View File

@@ -115,8 +115,10 @@ class QrCodeActionTest extends TestCase
$delegate = $this->createMock(RequestHandlerInterface::class);
$resp = $this->action($defaultOptions)->process($req->withAttribute('shortCode', $code), $delegate);
[$size] = getimagesizefromstring($resp->getBody()->__toString());
$result = getimagesizefromstring($resp->getBody()->__toString());
self::assertNotFalse($result);
[$size] = $result;
self::assertEquals($expectedSize, $size);
}
@@ -207,8 +209,9 @@ class QrCodeActionTest extends TestCase
$resp = $this->action($defaultOptions)->process($req, $delegate);
$image = imagecreatefromstring($resp->getBody()->__toString());
$color = imagecolorat($image, 1, 1);
self::assertNotFalse($image);
$color = imagecolorat($image, 1, 1);
self::assertEquals($color, $expectedColor);
}