@@ 399-413 (lines=15) @@ | ||
396 | $this->assertCount(1, $this->_em->getRepository(CmsGroup::class)->findAll()); |
|
397 | } |
|
398 | ||
399 | public function testRepositoryFindBy() |
|
400 | { |
|
401 | $this->loadFixtureData(); |
|
402 | ||
403 | $this->assertCount(1, $this->_em->getRepository(CmsGroup::class)->findBy( |
|
404 | ['id' => $this->groupId2] |
|
405 | )); |
|
406 | ||
407 | $this->useCMSGroupPrefixFilter(); |
|
408 | $this->_em->clear(); |
|
409 | ||
410 | $this->assertCount(0, $this->_em->getRepository(CmsGroup::class)->findBy( |
|
411 | ['id' => $this->groupId2] |
|
412 | )); |
|
413 | } |
|
414 | ||
415 | public function testRepositoryFindByX() |
|
416 | { |
|
@@ 427-441 (lines=15) @@ | ||
424 | $this->assertCount(0, $this->_em->getRepository(CmsGroup::class)->findById($this->groupId2)); |
|
425 | } |
|
426 | ||
427 | public function testRepositoryFindOneBy() |
|
428 | { |
|
429 | $this->loadFixtureData(); |
|
430 | ||
431 | $this->assertNotNull($this->_em->getRepository(CmsGroup::class)->findOneBy( |
|
432 | ['id' => $this->groupId2] |
|
433 | )); |
|
434 | ||
435 | $this->useCMSGroupPrefixFilter(); |
|
436 | $this->_em->clear(); |
|
437 | ||
438 | $this->assertNull($this->_em->getRepository(CmsGroup::class)->findOneBy( |
|
439 | ['id' => $this->groupId2] |
|
440 | )); |
|
441 | } |
|
442 | ||
443 | public function testRepositoryFindOneByX() |
|
444 | { |