This commit is contained in:
2022-02-11 13:45:21 +01:00
parent b5a1985fa1
commit 93345c09a1
3 changed files with 5 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ use Chill\PersonBundle\Entity\Household\HouseholdMember;
use Chill\PersonBundle\Entity\Person;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use RuntimeException;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\HttpFoundation\Request;
use function array_map;
@@ -59,8 +60,8 @@ final class HouseholdApiControllerTest extends WebTestCase
$nbReference = $em->createQueryBuilder()->select('count(ar)')->from(AddressReference::class, 'ar')
->getQuery()->getSingleScalarResult();
if ($nbReference === 0) {
throw new \RuntimeException('any reference found. Add a reference in database to perform this test');
if (0 === $nbReference) {
throw new RuntimeException('any reference found. Add a reference in database to perform this test');
}
$reference = $em->createQueryBuilder()->select('ar')->from(AddressReference::class, 'ar')