8000 minor #10632 [FrameworkBundle] Fix tests (jakzal) · symfony/symfony@27035b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 27035b4

Browse files
committed
minor #10632 [FrameworkBundle] Fix tests (jakzal)
This PR was merged into the 2.5-dev branch. Discussion ---------- [FrameworkBundle] Fix tests | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #10622 | License | MIT | Doc PR | - This [fixes the build](https://travis-ci.org/jakzal/symfony/builds/22199535) [![Build Status](https://travis-ci.org/jakzal/symfony.svg?branch=framework-bundle-tests-fix)](https://travis-ci.org/jakzal/symfony) by only initializing a fully configured validation service if APC is available. At the moment we only provide ApcCache for mapping' caching (out of the box). DoctrineCache is available but not configured. I also added an additional test case to verify that a validation service can be created on php >=5.5. Commits ------- 009c4b8 [FrameworkBundle] Only initialize a fully configured service if APC is available.
2 parents bc6020d + 009c4b8 commit 27035b4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,23 @@ public function testValidation()
277277
$this->assertSame(array('loadClassMetadata'), $calls[4][1]);
278278
$this->assertSame('setMetadataCache', $calls[5][0]);
279279
$this->assertEquals(array(new Reference('validator.mapping.cache.apc')), $calls[5][1]);
280+
}
281+
282+
public function testFullyConfiguredValidationService()
283+
{
284+
if (!extension_loaded('apc')) {
285+
$this->markTestSkipped('The apc extension is not available.');
286+
}
287+
288+
$container = $this->createContainerFromFile('full');
289+
290+
$this->assertInstanceOf('Symfony\Component\Validator\ValidatorInterface', $container->get('validator'));
291+
}
292+
293+
public function testValidationService()
294+
{
295+
$container = $this->createContainerFromFile('validation_annotations');
296+
280297
$this->assertInstanceOf('Symfony\Component\Validator\ValidatorInterface', $container->get('validator'));
281298
}
282299

0 commit comments

Comments
 (0)
0