|
|
@@ -510,6 +510,25 @@ class Zend_Loader_PluginLoaderTest extends PHPUnit_Framework_TestCase
|
|
|
}
|
|
|
$this->assertEquals(1, count($loader->getPaths('My_Namespace_')));
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @group ZF-11330
|
|
|
+ */
|
|
|
+ public function testLoadClassesWithBackslashInName()
|
|
|
+ {
|
|
|
+ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
|
|
+ $this->markTestSkipped(__CLASS__ . '::' . __METHOD__ . ' requires PHP 5.3.0 or greater');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ $loader = new Zend_Loader_PluginLoader(array());
|
|
|
+ $loader->addPrefixPath('Zfns\\', dirname(__FILE__) . '/_files/Zfns');
|
|
|
+ try {
|
|
|
+ $className = $loader->load('Foo\\Bar');
|
|
|
+ } catch (Exception $e) {
|
|
|
+ $this->fail(sprintf("Failed loading helper with backslashes in name"));
|
|
|
+ }
|
|
|
+ $this->assertEquals('Zfns\\Foo\\Bar', $className);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// Call Zend_Loader_PluginLoaderTest::main() if this source file is executed directly.
|