Skip to content

Commit f4b10e3

Browse files
[tests] Use @requires annotation when possible
1 parent ae53b65 commit f4b10e3

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)