/** * Retrieves the content. * * @return string */ public function getContent() { $content = '<span>Class Locations: </span>'; $content .= $this->formatLocations($this->classLoader->getLocations()); $content .= '<br />'; $content .= '<span>Plugin Locations: </span>'; $content .= $this->formatLocations($this->pluginLoader->getLocations()); $content .= '<br />'; $content .= '<span>File Locations: </span>'; $content .= $this->formatLocations($this->fileLoader->getLocations()); return $content; }
/** * Retrieves the loader. * * @return ClassLoader */ public function getLoader() { if (is_null($this->loader)) { $this->loader = new ClassLoader(); $this->loader->setLocation($this->getNamespace(), [$this->basedir . '/src']); $this->loader->setLocation('Neat', [__DIR__]); } return $this->loader; }
/** * @test */ public function autoload() { $this->assertTrue($this->subject->autoload($this->namespace . '\\Fixture\\TestClass2')); $this->assertTrue($this->subject->autoload($this->namespace . '\\Fixture\\TestClass3')); $this->assertFalse($this->subject->autoload($this->namespace . '\\Fixture\\TestClass')); }