/** * 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(); }
public function testItRegistersAutoloadFunction() { $this->assertTrue($this->sut->register()); $autoloaders = spl_autoload_functions(); $this->assertEquals([$this->sut, 'loadClass'], end($autoloaders)); }