Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #18657 [FrameworkBundle] Fix a typo and add a test to prevent new…
… regressions (Ener-Getick) This PR was merged into the 3.1-dev branch. Discussion ---------- [FrameworkBundle] Fix a typo and add a test to prevent new regressions | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | This fixes a typo introduced in #18630 and adds a new functional test to avoid most regressions in service definitions in the future when features are only available in non-debug mode. cc @nicolas-grekas Commits ------- 61872ce Fix a typo and add a check to prevent regressions
- Loading branch information
Showing
4 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/ContainerDumpTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional; | ||
|
||
/** | ||
* Checks that the container compiles correctly when all the bundle features are enabled. | ||
*/ | ||
class ContainerDumpTest extends WebTestCase | ||
{ | ||
public function testContainerCompilationInDebug() | ||
{ | ||
$client = $this->createClient(array('test_case' => 'ContainerDump', 'root_config' => 'config.yml')); | ||
|
||
$this->assertTrue($client->getContainer()->has('serializer')); | ||
} | ||
|
||
public function testContainerCompilation() | ||
{ | ||
$client = $this->createClient(array('test_case' => 'ContainerDump', 'root_config' => 'config.yml', 'debug' => false)); | ||
|
||
$this->assertTrue($client->getContainer()->has('serializer')); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/bundles.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\TestBundle; | ||
use Symfony\Bundle\FrameworkBundle\FrameworkBundle; | ||
|
||
return array( | ||
new FrameworkBundle(), | ||
new TestBundle(), | ||
); |
21 changes: 21 additions & 0 deletions
21
src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/ContainerDump/config.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
imports: | ||
- { resource: ../config/default.yml } | ||
|
||
framework: | ||
esi: true | ||
ssi: true | ||
fragments: true | ||
profiler: true | ||
router: true | ||
session: true | ||
request: true | ||
templating: | ||
enabled: true | ||
engines: ['php'] | ||
assets: true | ||
translator: true | ||
validation: true | ||
serializer: true | ||
property_info: true | ||
csrf_protection: true | ||
form: true |