10000 [HttpKernel] [DX] Configurable controller layout by scaytrase · Pull Request #25422 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] [DX] Configurable controller layout #25422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
scaytrase committed Dec 10, 2017
commit 845eaf877dfb79d026a6f5ebd15440f1b4716685
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
use Symfony\Component\HttpKernel\KernelInterface;
Expand Down Expand Up @@ -52,8 +53,9 @@ public function testDebugInvalidRoute()
*/
private function createCommandTester()
{
$application = new Application($this->getKernel());
$application->add(new RouterDebugCommand($this->getRouter()));
$kernel = $this->getKernel();
$application = new Application($kernel);
$application->add(new RouterDebugCommand($this->getRouter(), new ControllerNameParser($kernel)));

return new CommandTester($application->find('debug:router'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
use Symfony\Component\Console\Tester\CommandTester;
use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand;
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
Expand Down Expand Up @@ -46,9 +47,10 @@ public function testWithNotMatchPath()
*/
private function createCommandTester()
{
$application = new Application($this->getKernel());
$kernel = $this->getKernel();
$application = new Application($kernel);
$application->add(new RouterMatchCommand($this->getRouter()));
$application->add(new RouterDebugCommand($this->getRouter()));
$application->add(new RouterDebugCommand($this->getRouter(), new ControllerNameParser($kernel)));

return new CommandTester($application->find('router:match'));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ private function createParser()
{
$bundles = array(
'SensioCmsFooBundle' => $this->getBundle('TestBundle\Sensio\Cms\FooBundle', 'SensioCmsFooBundle'),
'FoooooBundle' => $this->getBundle('TestBundle\FooBundle', 'FoooooBundle'),
&# 6972 39;FooBundle' => $this->getBundle('TestBundle\FooBundle', 'FooBundle'),
);

Expand All @@ -161,11 +162,6 @@ private function createParser()
}))
;

$bundles = array(
'SensioCmsFooBundle' => $this->getBundle('TestBundle\Sensio\Cms\FooBundle', 'SensioCmsFooBundle'),
'FoooooBundle' => $this->getBundle('TestBundle\FooBundle', 'FoooooBundle'),
'FooBundle' => $this->getBundle('TestBundle\FooBundle', 'FooBundle'),
);
$kernel
->expects($this->any())
->method('getBundles')
Expand Down
0