Skip to content

Commit 958cf07

Browse files
minor #16186 [2.7][tests] Use @requires annotation when possible (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [2.7][tests] Use @requires annotation when possible | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- b028aea [tests] Use @requires annotation when possible
2 parents d9f4aa8 + f4b10e3 commit 958cf07

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

Tests/Console/Descriptor/JsonDescriptorTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,11 @@
1313

1414
use Symfony\Bundle\FrameworkBundle\Console\Descriptor\JsonDescriptor;
1515

16+
/**
17+
* @requires PHP 5.4
18+
*/
1619
class JsonDescriptorTest extends AbstractDescriptorTest
1720
{
18-
protected function setUp()
19-
{
20-
if (PHP_VERSION_ID < 50400) {
21-
$this->markTestSkipped('Test skipped on PHP 5.3 as JSON_PRETTY_PRINT does not exist.');
22-
}
23-
}
24-
2521
protected function getDescriptor()
2622
{
2723
return new JsonDescriptor();

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,10 @@ public function testValidation()
291291

292292
/**
293293
* @group legacy
294+
* @requires extension apc
294295
*/
295296
public function testLegacyFullyConfiguredValidationService()
296297
{
297-
if (!extension_loaded('apc')) {
298-
$this->markTestSkipped('The apc extension is not available.');
299-
}
300-
301298
$container = $this->createContainerFromFile('full');
302299

303300
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $container->get('validator'));

0 commit comments

Comments
 (0)