We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef145f3 commit 5f181e6Copy full SHA for 5f181e6
src/Codeception/Module/Symfony.php
@@ -818,17 +818,7 @@ private function getPossibleKernelClasses()
818
*/
819
public function seeNumRecords(int $expectedNum, string $className, array $criteria = [])
820
{
821
- $em = $this->_getEntityManager();
822
- $repository = $em->getRepository($className);
823
-
824
- if (empty($criteria)) {
825
- $currentNum = (int)$repository->createQueryBuilder('a')
826
- ->select('count(a.id)')
827
- ->getQuery()
828
- ->getSingleScalarResult();
829
- } else {
830
- $currentNum = $repository->count($criteria);
831
- }
+ $currentNum = $this->grabNumRecords($className, $criteria);
832
833
$this->assertEquals(
834
$expectedNum,
0 commit comments