mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
Fix #1260 : Prefix plugin twig namespace with "plugin-"
This commit is contained in:
@@ -153,13 +153,13 @@ return array(
|
||||
EOF;
|
||||
|
||||
foreach ($manifests as $manifest) {
|
||||
$name = $this->quote($manifest->getName());
|
||||
$namespace = $this->quote('plugin-' . $manifest->getName());
|
||||
$path = $this->pluginDirectory . DIRECTORY_SEPARATOR . $manifest->getName() . DIRECTORY_SEPARATOR . 'views';
|
||||
|
||||
if (is_dir($path)) {
|
||||
$path = $this->quote($path);
|
||||
$buffer .= <<<EOF
|
||||
$name => $path,
|
||||
$namespace => $path,
|
||||
EOF;
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,7 @@ class AutoloaderGeneratorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertInstanceOf('Vendor\CustomCommand', $cli['console']->find('hello:world'));
|
||||
|
||||
$mapping = require $pluginsDir . '/twig-paths.php';
|
||||
$this->assertSame(array('TestPlugin' => $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/twig-views'), $mapping);
|
||||
$this->assertSame(array('plugin-TestPlugin' => $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/views', $pluginsDir . '/TestPlugin/twig-views'), $mapping);
|
||||
|
||||
$this->cleanup($files);
|
||||
}
|
||||
|
Reference in New Issue
Block a user