|
16 | 16 | use Symfony\Component\DependencyInjection\ContainerBuilder;
|
17 | 17 | use Symfony\Component\Filesystem\Filesystem;
|
18 | 18 | use Symfony\Component\HttpKernel\Bundle\BundleInterface;
|
19 |
| -use Symfony\Component\HttpKernel\Config\EnvParametersResource; |
20 | 19 | use Symfony\Component\HttpKernel\Kernel;
|
21 | 20 | use Symfony\Component\HttpKernel\HttpKernelInterface;
|
22 | 21 | use Symfony\Component\HttpFoundation\Request;
|
@@ -104,42 +103,6 @@ public function testClassCacheIsNotLoadedByDefault()
|
104 | 103 | $kernel->boot();
|
105 | 104 | }
|
106 | 105 |
|
107 |
| - public function testEnvParametersResourceIsAdded() |
108 |
| - { |
109 |
| - $container = new ContainerBuilder(); |
110 |
| - $kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\KernelForTest') |
111 |
| - ->disableOriginalConstructor() |
112 |
| - ->setMethods(array('getContainerBuilder', 'prepareContainer', 'getCacheDir', 'getLogDir')) |
113 |
| - ->getMock(); |
114 |
| - $kernel->expects($this->any()) |
115 |
| - ->method('getContainerBuilder') |
116 |
| - ->will($this->returnValue($container)); |
117 |
| - $kernel->expects($this->any()) |
118 |
| - ->method('prepareContainer') |
119 |
| - ->will($this->returnValue(null)); |
120 |
| - $kernel->expects($this->any()) |
121 |
| - ->method('getCacheDir') |
122 |
| - ->will($this->returnValue(sys_get_temp_dir())); |
123 |
| - $kernel->expects($this->any()) |
124 |
| - ->method('getLogDir') |
125 |
| - ->will($this->returnValue(sys_get_temp_dir())); |
126 |
| - |
127 |
| - $reflection = new \ReflectionClass(get_class($kernel)); |
128 |
| - $method = $reflection->getMethod('buildContainer'); |
129 |
| - $method->setAccessible(true); |
130 |
| - $method->invoke($kernel); |
131 |
| - |
132 |
| - $found = false; |
133 |
| - foreach ($container->getResources() as $resource) { |
134 |
| - if ($resource instanceof EnvParametersResource) { |
135 |
| - $found = true; |
136 |
| - break; |
137 |
| - } |
138 |
| - } |
139 |
| - |
140 |
| - $this->assertTrue($found); |
141 |
| - } |
142 |
| - |
143 | 106 | public function testBootKernelSeveralTimesOnlyInitializesBundlesOnce()
|
144 | 107 | {
|
145 | 108 | $kernel = $this->getKernel(array('initializeBundles', 'initializeContainer'));
|
|
0 commit comments