Ejemplo n.º 1
0
 /**
  * @covers \GeneratedHydrator\Configuration::doesAutoGenerateProxies
  * @covers \GeneratedHydrator\Configuration::setAutoGenerateProxies
  */
 public function testGetSetAutoGenerateProxies()
 {
     $this->assertTrue($this->configuration->doesAutoGenerateProxies(), 'Default setting check for BC');
     $this->configuration->setAutoGenerateProxies(false);
     $this->assertFalse($this->configuration->doesAutoGenerateProxies());
     $this->configuration->setAutoGenerateProxies(true);
     $this->assertTrue($this->configuration->doesAutoGenerateProxies());
 }
Ejemplo n.º 2
0
 /**
  * Gets the hydrator class name.
  *
  * @param string $fqcn
  *
  * @return string
  */
 public function getHydratorClassName($fqcn)
 {
     $config = new Configuration($fqcn);
     $config->setAutoGenerateProxies($this->generateProxies);
     $config->setGeneratedClassesTargetDir($this->cacheDir);
     return $config->createFactory()->getHydratorClass();
 }