Example #1
0
 /**
  * @param string $entityClass
  *
  * @return TemplateFixtureInterface|null
  *
  * @throws InvalidConfigurationException
  */
 public function getEntityFixture($entityClass)
 {
     if (!$this->hasEntityFixture($entityClass)) {
         // use a fixture which returns an empty entity if more concrete fixture is not registered
         $fixture = new EmptyFixture($entityClass);
         $fixture->setTemplateManager($this);
         $this->repositories[$entityClass] = $fixture;
     }
     return $this->repositories[$entityClass];
 }
Example #2
0
 public function testGetEntityClass()
 {
     $fixture = new EmptyFixture('\\stdClass');
     $this->assertEquals('\\stdClass', $fixture->getEntityClass());
 }