You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently in the process of upgrading phpstan an phpstan-doctrine to the current version (phpstan 1.11.6, phpstan-doctrine 1.4.4) and I'm encountering a new error.
We have a test like the following:
public function testCleanup(EntityManager $entityManager): void
{
if ([] !== $entityManager->getRepository(Favourite::class)->findAll()) {
self::markTestSkipped('Invalid setup');
}
foreach ([1,2,3] as $dummy) {
// setup ...
$entityManager->clear();
}
self::assertCount(4, $entityManager->getRepository(Favourite::class)->findAll());
// ...
}
This test reports Call to static method PHPUnit\Framework\Assert::assertCount() with 4 and array{} will always evaluate to false..
When adding a $entityManager->clear(); outside the loop, no error is reported.
The text was updated successfully, but these errors were encountered:
I'm currently in the process of upgrading phpstan an phpstan-doctrine to the current version (phpstan 1.11.6, phpstan-doctrine 1.4.4) and I'm encountering a new error.
We have a test like the following:
This test reports
Call to static method PHPUnit\Framework\Assert::assertCount() with 4 and array{} will always evaluate to false.
.When adding a
$entityManager->clear();
outside the loop, no error is reported.The text was updated successfully, but these errors were encountered: