Skip to content

Commit 389735a

Browse files
[tests] Use @requires annotation when possible
1 parent 59ed373 commit 389735a

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

Tests/Constraints/LengthValidatorTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ public function getFiveOrMoreCharacters()
8989
);
9090
}
9191

92+
/**
93+
* @requires extension mbstring
94+
*/
9295
public function getOneCharset()
9396
{
94-
if (!function_exists('iconv') && !function_exists('mb_convert_encoding')) {
95-
$this->markTestSkipped('Mbstring or iconv is required for this test.');
96-
}
97-
9897
return array(
9998
array('é', 'utf8', true),
10099
array("\xE9", 'CP1252', true),

Tests/Mapping/Cache/ApcCacheTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class ApcCacheTest extends \PHPUnit_Framework_TestCase
1717
{
1818
protected function setUp()
1919
{
20-
if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
21-
$this->markTestSkipped('APC is not loaded.');
20+
if (!ini_get('apc.enable') || !ini_get('apc.enable_cli')) {
21+
$this->markTestSkipped('APC is not enabled.');
2222
}
2323
}
2424

Tests/Mapping/Loader/StaticMethodLoaderTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ public function testLoadClassMetadataIgnoresAbstractMethods()
9494
// strict standards error
9595
error_reporting(0);
9696

97-
if (0 !== error_reporting()) {
98-
$this->markTestSkipped('Could not disable error reporting');
99-
}
100-
10197
$metadata = new ClassMetadata(__NAMESPACE__.'\AbstractStaticMethodLoader');
10298

10399
$loader = new StaticMethodLoader('loadMetadata');

0 commit comments

Comments
 (0)