コード例 #1
0
 /**
  * TypeRegistry constructor.
  * @param EnumTypeGenerator $typeGenerator
  * @param EnumTypeStorage $typeStorage
  */
 public function __construct(EnumTypeGenerator $typeGenerator, EnumTypeStorage $typeStorage)
 {
     $this->typeGenerator = $typeGenerator;
     $this->typeStorage = $typeStorage;
     $autoloader = new EnumTypeAutoloader($this->typeStorage);
     $autoloader->register();
 }
コード例 #2
0
 public function testItRegistersAutoloadFunction()
 {
     $this->assertTrue($this->sut->register());
     $autoloaders = spl_autoload_functions();
     $this->assertEquals([$this->sut, 'loadClass'], end($autoloaders));
 }