Skip to content

Commit 503d2de

Browse files
committed
minor symfony#13206 [2.3] Cleanup deprecations (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [2.3] Cleanup deprecations | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | let's see | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- d649bef [2.3] Remove useless tests skips 1d68ad3 [2.3] Cleanup deprecations
2 parents efa1436 + d649bef commit 503d2de

File tree

189 files changed

+176
-1416
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+176
-1416
lines changed

src/Symfony/Bridge/Doctrine/Tests/ContainerAwareEventManagerTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ class ContainerAwareEventManagerTest extends \PHPUnit_Framework_TestCase
1818
{
1919
protected function setUp()
2020
{
21-
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
22-
$this->markTestSkipped('The "DependencyInjection" component is not available');
23-
}
24-
2521
$this->container = new Container();
2622
$this->evm = new ContainerAwareEventManager($this->container);
2723
}

src/Symfony/Bridge/Doctrine/Tests/DataCollector/DoctrineDataCollectorTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@
1818

1919
class DoctrineDataCollectorTest extends \PHPUnit_Framework_TestCase
2020
{
21-
protected function setUp()
22-
{
23-
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
24-
$this->markTestSkipped('Doctrine DBAL is not available.');
25-
}
26-
27-
if (!class_exists('Symfony\Component\HttpKernel\HttpKernel')) {
28-
$this->markTestSkipped('The "HttpKernel" component is not available');
29-
}
30-
}
31-
3221
public function testCollectConnections()
3322
{
3423
$c = $this->createCollector(array());

src/Symfony/Bridge/Doctrine/Tests/DataFixtures/ContainerAwareLoaderTest.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@
1616

1717
class ContainerAwareLoaderTest extends \PHPUnit_Framework_TestCase
1818
{
19-
protected function setUp()
20-
{
21-
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
22-
$this->markTestSkipped('The "DependencyInjection" component is not available');
23-
}
24-
25-
if (!class_exists('Doctrine\Common\DataFixtures\Loader')) {
26-
$this->markTestSkipped('Doctrine Data Fixtures is not available.');
27-
}
28-
}
29-
3019
public function testShouldSetContainerOnContainerAwareFixture()
3120
{
3221
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPassTest.php

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

1818
class RegisterEventListenersAndSubscribersPassTest extends \PHPUnit_Framework_TestCase
1919
{
20-
protected function setUp()
21-
{
22-
if (!class_exists('Symfony\Component\DependencyInjection\Container')) {
23-
$this->markTestSkipped('The "DependencyInjection" component is not available');
24-
}
25-
}
26-
2720
/**
2821
* @expectedException \InvalidArgumentException
2922
*/

src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,11 @@
1616
/**
1717
* Class DoctrineOrmTestCase.
1818
*
19-
* @deprecated Deprecated as of Symfony 2.4, to be removed in Symfony 3.0.
19+
* @deprecated Deprecated as of Symfony 2.3, to be removed in Symfony 3.0.
2020
* Use {@link DoctrineTestHelper} instead.
2121
*/
2222
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
2323
{
24-
protected function setUp()
25-
{
26-
if (!class_exists('Doctrine\Common\Version')) {
27-
$this->markTestSkipped('Doctrine Common is not available.');
28-
}
29-
30-
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
31-
$this->markTestSkipped('Doctrine DBAL is not available.');
32-
}
33-
34-
if (!class_exists('Doctrine\ORM\EntityManager')) {
35-
$this->markTestSkipped('Doctrine ORM is not available.');
36-
}
37-
}
38-
3924
/**
4025
* @return \Doctrine\ORM\EntityManager
4126
*/

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/AbstractEntityChoiceListTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ abstract class AbstractEntityChoiceListTest extends AbstractChoiceListTest
3636

3737
protected function setUp()
3838
{
39-
if (!class_exists('Symfony\Component\Form\Form')) {
40-
$this->markTestSkipped('The "Form" component is not available');
41-
}
42-
43-
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
44-
$this->markTestSkipped('Doctrine DBAL is not available.');
45-
}
46-
47-
if (!class_exists('Doctrine\Common\Version')) {
48-
$this->markTestSkipped('Doctrine Common is not available.');
49-
}
50-
51-
if (!class_exists('Doctrine\ORM\EntityManager')) {
52-
$this->markTestSkipped('Doctrine ORM is not available.');
53-
}
54-
5539
$this->em = DoctrineTestHelper::createTestEntityManager();
5640

5741
$schemaTool = new SchemaTool($this->em);

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/GenericEntityChoiceListTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ class GenericEntityChoiceListTest extends \PHPUnit_Framework_TestCase
3636

3737
protected function setUp()
3838
{
39-
if (!class_exists('Symfony\Component\Form\Form')) {
40-
$this->markTestSkipped('The "Form" component is not available');
41-
}
42-
43-
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
44-
$this->markTestSkipped('Doctrine DBAL is not available.');
45-
}
46-
47-
if (!class_exists('Doctrine\Common\Version')) {
48-
$this->markTestSkipped('Doctrine Common is not available.');
49-
}
50-
51-
if (!class_exists('Doctrine\ORM\EntityManager')) {
52-
$this->markTestSkipped('Doctrine ORM is not available.');
53-
}
54-
5539
$this->em = DoctrineTestHelper::createTestEntityManager();
5640

5741
$schemaTool = new SchemaTool($this->em);

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList;
1313

1414
use Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader;
15-
use Symfony\Bridge\Doctrine\Tests\DoctrineOrmTestCase;
15+
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
1616
use Doctrine\DBAL\Connection;
1717

18-
class ORMQueryBuilderLoaderTest extends DoctrineOrmTestCase
18+
class ORMQueryBuilderLoaderTest extends DoctrineTestHelper
1919
{
2020
/**
2121
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Form\Test\FormPerformanceTestCase;
1515
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
1616
use Doctrine\ORM\Tools\SchemaTool;
17-
use Symfony\Bridge\Doctrine\Tests\DoctrineOrmTestCase;
17+
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
1818
use Symfony\Component\Form\Extension\Core\CoreExtension;
1919
use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension;
2020

@@ -50,23 +50,7 @@ protected function getExtensions()
5050

5151
protected function setUp()
5252
{
53-
if (!class_exists('Symfony\Component\Form\Form')) {
54-
$this->markTestSkipped('The "Form" component is not available');
55-
}
56-
57-
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
58-
$this->markTestSkipped('Doctrine DBAL is not available.');
59-
}
60-
61-
if (!class_exists('Doctrine\Common\Version')) {
62-
$this->markTestSkipped('Doctrine Common is not available.');
63-
}
64-
65-
if (!class_exists('Doctrine\ORM\EntityManager')) {
66-
$this->markTestSkipped('Doctrine ORM is not available.');
67-
}
68-
69-
$this->em = DoctrineOrmTestCase::createTestEntityManager();
53+
$this->em = DoctrineTestHelper::createTestEntityManager();
7054

7155
parent::setUp();
7256

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,6 @@ class EntityTypeTest extends TypeTestCase
4343

4444
protected function setUp()
4545
{
46-
if (!class_exists('Symfony\Component\Form\Form')) {
47-
$this->markTestSkipped('The "Form" component is not available');
48-
}
49-
50-
if (!class_exists('Doctrine\DBAL\Platforms\MySqlPlatform')) {
51-
$this->markTestSkipped('Doctrine DBAL is not available.');
52-
}
53-
54-
if (!class_exists('Doctrine\Common\Version')) {
55-
$this->markTestSkipped('Doctrine Common is not available.');
56-
}
57-
58-
if (!class_exists('Doctrine\ORM\EntityManager')) {
59-
$this->markTestSkipped('Doctrine ORM is not available.');
60-
}
61-
6246
$this->em = DoctrineTestHelper::createTestEntityManager();
6347
$this->emRegistry = $this->createRegistryMock('default', $this->em);
6448

0 commit comments

Comments
 (0)