Skip to content

Commit 238b927

Browse files
[2.3] Remove useless tests skips
1 parent cf603c0 commit 238b927

File tree

6 files changed

+16
-19
lines changed

6 files changed

+16
-19
lines changed

Tests/Mapping/Loader/AnnotationLoaderTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@
2323

2424
class AnnotationLoaderTest extends \PHPUnit_Framework_TestCase
2525
{
26-
protected function setUp()
27-
{
28-
if (!class_exists('Doctrine\Common\Annotations\AnnotationReader')) {
29-
$this->markTestSkipped('The "Doctrine Common" library is not available');
30-
}
31-
}
32-
3326
public function testLoadClassMetadataReturnsTrueIfSuccessful()
3427
{
3528
$reader = new AnnotationReader();

Tests/Mapping/Loader/YamlFileLoaderTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@
2323

2424
class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
2525
{
26-
protected function setUp()
27-
{
28-
if (!class_exists('Symfony\Component\Yaml\Yaml')) {
29-
$this->markTestSkipped('The "Yaml" component is not available');
30-
}
31-
}
32-
3326
public function testLoadClassMetadataReturnsFalseIfEmpty()
3427
{
3528
$loader = new YamlFileLoader(__DIR__.'/empty-mapping.yml');

Tests/ValidatorBuilderTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ public function testAddMethodMappings()
7575

7676
public function testEnableAnnotationMapping()
7777
{
78-
if (!class_exists('Doctrine\Common\Annotations\AnnotationReader')) {
79-
$this->markTestSkipped('Annotations is required for this test');
80-
}
81-
8278
$this->assertSame($this->builder, $this->builder->enableAnnotationMapping());
8379
}
8480

Tests/bootstrap.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
$loader = require __DIR__.'/../vendor/autoload.php';
13+
14+
Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(function ($class) {return class_exists($class);});

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"symfony/translation": "~2.0,>=2.0.5"
2121
},
2222
"require-dev": {
23+
"doctrine/common": "~2.3",
2324
"symfony/http-foundation": "~2.1",
2425
"symfony/intl": "~2.3",
2526
"symfony/yaml": "~2.0,>=2.0.5",

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
55
backupGlobals="false"
66
colors="true"
7-
bootstrap="vendor/autoload.php"
7+
bootstrap="Tests/bootstrap.php"
88
>
99
<php>
1010
<!-- Silence E_USER_DEPRECATED (-16385 == -1 & ~E_USER_DEPRECATED) -->

0 commit comments

Comments
 (0)