diff --git a/src/Symfony/Bundle/TwigBundle/Extension/CodeExtension.php b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php similarity index 99% rename from src/Symfony/Bundle/TwigBundle/Extension/CodeExtension.php rename to src/Symfony/Bridge/Twig/Extension/CodeExtension.php index 65d51f4773..c65c026975 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/CodeExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/CodeExtension.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Symfony\Bundle\TwigBundle\Extension; +namespace Symfony\Bridge\Twig\Extension; if (!defined('ENT_SUBSTITUTE')) { define('ENT_SUBSTITUTE', 8); diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Extension/CodeExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php similarity index 94% rename from src/Symfony/Bundle/TwigBundle/Tests/Extension/CodeExtensionTest.php rename to src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php index 15f7b5e5bd..d935651439 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/Extension/CodeExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/CodeExtensionTest.php @@ -9,9 +9,9 @@ * file that was distributed with this source code. */ -namespace Symfony\Bundle\TwigBundle\Tests\Extension; +namespace Symfony\Bridge\Twig\Tests\Extension; -use Symfony\Bundle\TwigBundle\Extension\CodeExtension; +use Symfony\Bridge\Twig\Extension\CodeExtension; class CodeExtensionTest extends \PHPUnit_Framework_TestCase { diff --git a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml index 1f310af134..d54035b425 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml +++ b/src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml @@ -13,7 +13,7 @@ Symfony\Bridge\Twig\Extension\TranslationExtension Symfony\Bundle\TwigBundle\Extension\AssetsExtension Symfony\Bundle\TwigBundle\Extension\ActionsExtension - Symfony\Bundle\TwigBundle\Extension\CodeExtension + Symfony\Bridge\Twig\Extension\CodeExtension Symfony\Bridge\Twig\Extension\RoutingExtension Symfony\Bridge\Twig\Extension\YamlExtension Symfony\Bridge\Twig\Extension\FormExtension diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ExceptionControllerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ExceptionControllerTest.php deleted file mode 100644 index 03ff57263a..0000000000 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Controller/ExceptionControllerTest.php +++ /dev/null @@ -1,89 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\WebProfilerBundle\Tests\Controller; - -use Symfony\Bundle\WebProfilerBundle\Tests\TestCase; - -use Symfony\Bundle\WebProfilerBundle\Controller\ExceptionController; -use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\DependencyInjection\Scope; -use Symfony\Component\DependencyInjection\Definition; - -class ExceptionControllerTest extends TestCase -{ - protected $controller; - protected $container; - protected $flatten; - protected $kernel; - - protected function setUp() - { - parent::setUp(); - - $this->flatten = $this->getMock('Symfony\Component\HttpKernel\Exception\FlattenException'); - $this->flatten->expects($this->once())->method('getStatusCode')->will($this->returnValue(404)); - $this->controller = new ExceptionController(); - $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface'); - $this->container = $this->getContainer(); - } - - protected function tearDown() - { - parent::tearDown(); - - $this->controller = null; - $this->container = null; - $this->flatten = null; - $this->kernel = null; - } - - /** - * @dataProvider getDebugModes - */ - public function testShowActionDependingOnDebug($debug) - { - $this->container->setParameter('kernel.debug', $debug); - $this->controller->setContainer($this->container); - $this->controller->showAction($this->flatten); - } - - public function getDebugModes() - { - return array( - array(true), - array(false), - ); - } - - private function getContainer() - { - $container = new ContainerBuilder(); - $container->addScope(new Scope('request')); - $container->register('request', 'Symfony\\Component\\HttpFoundation\\Request')->setScope('request'); - $container->register('templating.helper.assets', $this->getMockClass('Symfony\\Component\\Templating\\Helper\\AssetsHelper')); - $container->register('templating.helper.router', $this->getMockClass('Symfony\\Bundle\\FrameworkBundle\\Templating\\Helper\\RouterHelper')) - ->addArgument(new Definition($this->getMockClass('Symfony\\Component\\Routing\\RouterInterface'))); - $container->register('twig', 'Twig_Environment'); - $container->register('templating.engine.twig', $this->getMockClass('Symfony\\Bundle\\TwigBundle\\TwigEngine')) - ->addArgument($this->getMock('Twig_Environment')) - ->addArgument($this->getMock('Symfony\\Component\\Templating\\TemplateNameParserInterface')) - ->addArgument(new Definition($this->getMockClass('Symfony\Component\Config\FileLocatorInterface'))) - ->addArgument($this->getMock('Symfony\\Bundle\\FrameworkBundle\\Templating\\GlobalVariables', array(), array($this->getMock('Symfony\\Component\\DependencyInjection\\Container')))); - $container->setAlias('templating', 'templating.engine.twig'); - $container->setParameter('kernel.bundles', array()); - $container->setParameter('kernel.cache_dir', __DIR__); - $container->setParameter('kernel.root_dir', __DIR__); - $container->set('kernel', $this->kernel); - - return $container; - } -}