minor #28762 [FrameworkBundle] Fix 3.4 tests (ogizanagi)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix 3.4 tests

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes (AppVeyor failure unrelated)    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Should fix tests on 3.4 branch after https://github.com/symfony/symfony/pull/28735 being merged.
Also updates the check for consistency with https://github.com/symfony/symfony/pull/27429/files#diff-5e7347edce37c5886ec67b7ba02f3a9cR837 on master.

Commits
-------

3b99a0d823 [FrameworkBundle] Fix 3.4 tests
This commit is contained in:
Fabien Potencier 2018-10-08 11:00:30 +02:00
commit 0df45a23a2
3 changed files with 3 additions and 9 deletions

View File

@ -21,7 +21,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Form\Form;
use Symfony\Component\Lock\Lock;
use Symfony\Component\Lock\Store\SemaphoreStore;
use Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Translation\Translator;
@ -824,7 +824,7 @@ class Configuration implements ConfigurationInterface
->children()
->arrayNode('property_info')
->info('Property info configuration')
->{!class_exists(FullStack::class) && class_exists(PropertyInfoExtractor::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->{!class_exists(FullStack::class) && interface_exists(PropertyInfoExtractorInterface::class) ? 'canBeDisabled' : 'canBeEnabled'}()
->end()
->end()
;

View File

@ -335,7 +335,7 @@ class ConfigurationTest extends TestCase
'throw_exception_on_invalid_index' => false,
),
'property_info' => array(
'enabled' => false,
'enabled' => !class_exists(FullStack::class),
),
'router' => array(
'enabled' => false,

View File

@ -979,12 +979,6 @@ abstract class FrameworkExtensionTest extends TestCase
$this->assertFalse($container->hasDefinition('serializer'));
}
public function testPropertyInfoDisabled()
{
$container = $this->createContainerFromFile('default_config');
$this->assertFalse($container->has('property_info'));
}
public function testPropertyInfoEnabled()
{
$container = $this->createContainerFromFile('property_info');