getClassLoader() public method

Return the requested class loader instance
public getClassLoader ( string $identifier ) : AppserverIo\Appserver\Core\Interfaces\ClassLoaderInterface
$identifier string The unique identifier of the requested class loader
return AppserverIo\Appserver\Core\Interfaces\ClassLoaderInterface The class loader instance
コード例 #1
0
ファイル: ApplicationTest.php プロジェクト: ruchee/appserver
 /**
  * Test if the getter for a certain class loader works.
  *
  * @return void
  */
 public function testGetClassLoader()
 {
     $mockLoader = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ClassLoaderInterface');
     $reflectionClass = new \ReflectionClass($mockLoader);
     $mockLoaderConfig = $this->getMock('\\AppserverIo\\Appserver\\Core\\Api\\Node\\ClassLoaderNodeInterface');
     $mockLoaderConfig->expects($this->any())->method('getName')->will($this->returnValue($reflectionClass->getShortName()));
     $this->application->addClassLoader($mockLoader, $mockLoaderConfig);
     $this->assertEquals($mockLoader, $this->application->getClassLoader($reflectionClass->getShortName()));
 }