8000 [HttpKernel] Normalized container classname in kernel by xabbuh · Pull Request #27029 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] Normalized container classname in kernel #27029

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 3 commits into from
Closed
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
xabbuh committed Apr 24, 2018
commit 42b67a45511ffe5a2b5ec876e5255b67639849fd
41 changes: 41 additions & 0 deletions src/Symfony/Component/HttpKernel/Tests/KernelTest.php
8000
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
namespace Symfony\Component\HttpKernel\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
Expand Down Expand Up @@ -899,3 +900,43 @@ public function handle(Request $request, $type = self::MASTER_REQUEST, $catch =
{
}
}

class CustomProjectDirKernel extends Kernel
{
private $buildContainer;
private $httpKernel;

public function __construct(\Closure $buildContainer = null, HttpKernelInterface $httpKernel = null, $name = 'custom')
{
parent::__construct($name, true);

$this->buildContainer = $buildContainer;
$this->httpKernel = $httpKernel;
}

public function registerBundles()
{
return array();
}

public function registerContainerConfiguration(LoaderInterface $loader)
{
}

public function getRootDir()
{
return __DIR__.'/Fixtures';
}

protected function build(ContainerBuilder $container)
{
if ($build = $this->buildContainer) {
$build($container);
}
}

protected function getHttpKernel()
{
return $this->httpKernel;
}
}
0