public function testAddClassLoader()
{
// create a mock loader configuration
$classToMock = 'AppserverIo\\Appserver\\Core\\Api\\Node\\ClassLoaderNodeInterface';
$mockLoaderConfiguration = $this->getMock($classToMock, get_class_methods($classToMock));
$mockLoaderConfiguration->expects($this->any())->method('getName')->will($this->returnValue('MockLoader'));
// create the mock class loader instance
$mockLoader = $this->getMock('\\AppserverIo\\Appserver\\Core\\Interfaces\\ClassLoaderInterface');
// add the class loader to the application
$this->application->addClassLoader($mockLoader, $mockLoaderConfiguration);
// iterate over the class loaders
foreach ($this->application->getClassLoaders() as $cls) {
$this->assertEquals($cls, $mockLoader);
}
}