/**
  * @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());
 }
Example #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();
 }