Example #1
0
 /**
  * @covers DmMailer\Repository\Template
  */
 public function testAdminPageExecutesSearch()
 {
     $fixture = new LoadDefaultTemplate();
     $this->fixtureExectutor->execute([$fixture]);
     $actualResult = $this->sut->getAdminPage(['t.entityId = 1']);
     $queryResult = $actualResult->getResult();
     $this->assertCount(1, $queryResult);
 }
 /**
  * Construct new fixtures loader instance.
  *
  * @param DocumentManager $dm DocumentManager instance used for persistence.
  */
 public function __construct(DocumentManager $dm, PHPCRPurger $purger = null)
 {
     $this->dm = $dm;
     if ($purger !== null) {
         $this->purger = $purger;
         $this->purger->setDocumentManager($dm);
     }
     parent::__construct($dm);
 }
 /**
  * Construct new fixtures loader instance.
  *
  * @param EntityManager $em EntityManager instance used for persistence.
  */
 public function __construct(EntityManager $em, ORMPurger $purger = null)
 {
     $this->em = $em;
     if ($purger !== null) {
         $this->purger = $purger;
         $this->purger->setEntityManager($em);
     }
     parent::__construct($em);
 }
 /**
  * Construct new fixtures loader instance.
  *
  * @param DocumentManager $dm DocumentManager instance used for persistence.
  */
 public function __construct(DocumentManager $dm, MongoDBPurger $purger = null)
 {
     $this->dm = $dm;
     if ($purger !== null) {
         $this->purger = $purger;
         $this->purger->setDocumentManager($dm);
     }
     parent::__construct($dm);
     $dm->getEventManager()->addEventSubscriber(new MongoDBReferenceListener($this->referenceRepository));
 }
Example #5
0
 /**
  * Construct new fixtures loader instance.
  *
  * @param EntityManager $em EntityManager instance used for persistence.
  */
 public function __construct(EntityManager $em, ORMPurger $purger = null)
 {
     $this->em = $em;
     if ($purger !== null) {
         $this->purger = $purger;
         $this->purger->setEntityManager($em);
     }
     parent::__construct($em);
     $em->getEventManager()->addEventSubscriber(new ORMReferenceListener($this->referenceRepository));
 }
 /**
  * @param $referenceName
  * @return object
  */
 public function getReference($referenceName)
 {
     return $this->fixtures->getReferenceRepository()->getReference($referenceName);
 }