assertContains( array('PhpOffice\\Common\\Autoloader', 'autoload'), spl_autoload_functions() ); } /** * Autoload */ public function testAutoload() { $declared = get_declared_classes(); $declaredCount = count($declared); Autoloader::autoload('Foo'); $this->assertEquals( $declaredCount, count(get_declared_classes()), 'PhpOffice\\Common\\Autoloader::autoload() is trying to load ' . 'classes outside of the PhpOffice\\Common namespace' ); } }