/** * @group ZF-7350 */ public function testPrefixesEndingInBackslashDenoteNamespacedClasses() { $loader = new PluginLoader(array()); $loader->addPrefixPath('Zfns\\', dirname(__FILE__) . '/_files/Zfns'); try { $className = $loader->load('Foo'); } catch (Exception $e) { $paths = $loader->getPaths(); $this->fail(sprintf("Failed loading helper; paths: %s", var_export($paths, 1))); } $this->assertEquals('Zfns\\Foo', $className); $this->assertEquals('Zfns\\Foo', $loader->getClassName('Foo')); }
/** * Returns a default adapter plugin loader * * @return Zend\Loader\PluginLoader\PluginLoader */ protected static function _getDefaultAdapterLoader() { $loader = new PluginLoader\PluginLoader(); $loader->addPrefixPath('Zend\\Serializer\\Adapter\\', __DIR__ . '/Serializer/Adapter'); return $loader; }