8000 minor #32889 [PhpUnitBridge] Remove use of ForwardCompatTrait (jderusse) · hultberg/symfony@6fb0ee3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6fb0ee3

Browse files
minor symfony#32889 [PhpUnitBridge] Remove use of ForwardCompatTrait (jderusse)
This PR was merged into the 3.4 branch. Discussion ---------- [PhpUnitBridge] Remove use of ForwardCompatTrait | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#32844 | License | MIT | Doc PR | NA With symfony#32882 the ForwardCompatibilityTrait is injected in TestCase which now act as a true polyfill Commits ------- ac6242f Remove use of ForwardCompatTrait
2 parents b5c5e29 + 165430f commit 6fb0ee3

26 files changed

+20
-98
lines changed

Tests/Annotation/GroupsTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
namespace Symfony\Component\Serializer\Tests\Annotation;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Annotation\Groups;
1716

1817
/**
1918
* @author Kévin Dunglas <dunglas@gmail.com>
2019
*/
2120
class GroupsTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
public function testEmptyGroupsParameter()
2623
{
2724
$this->expectException('Symfony\Component\Serializer\Exception\InvalidArgumentException');

Tests/Annotation/MaxDepthTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
namespace Symfony\Component\Serializer\Tests\Annotation;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Annotation\MaxDepth;
1716

1817
/**
1918
* @author Kévin Dunglas <dunglas@gmail.com>
2019
*/
2120
class MaxDepthTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
public function testNotSetMaxDepthParameter()
2623
{
2724
$this->expectException('Symfony\Component\Serializer\Exception\InvalidArgumentException');

Tests/DependencyInjection/SerializerPassTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Serializer\Tests\DependencyInjection;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\DependencyInjection\ContainerBuilder;
1716
use Symfony\Component\DependencyInjection\Reference;
1817
use Symfony\Component\Serializer\DependencyInjection\SerializerPass;
@@ -24,8 +23,6 @@
2423
*/
2524
class SerializerPassTest extends TestCase
2625
{
27-
use ForwardCompatTestTrait;
28-
2926
public function testThrowExceptionWhenNoNormalizers()
3027
{
3128
$this->expectException('RuntimeException');

Tests/Encoder/ChainDecoderTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\ChainDecoder;
1716

1817
class ChainDecoderTest extends TestCase
1918
{
20-
use ForwardCompatTestTrait;
21-
2219
const FORMAT_1 = 'format1';
2320
const FORMAT_2 = 'format2';
2421
const FORMAT_3 = 'format3';
@@ -27,7 +24,7 @@ class ChainDecoderTest extends TestCase
2724
private $decoder1;
2825
private $decoder2;
2926

30-
private function doSetUp()
27+
protected function setUp()
3128
{
3229
$this->decoder1 = $this
3330
->getMockBuilder('Symfony\Component\Serializer\Encoder\DecoderInterface')

Tests/Encoder/ChainEncoderTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,12 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\ChainEncoder;
1716
use Symfony\Component\Serializer\Encoder\EncoderInterface;
1817
use Symfony\Component\Serializer\Encoder\NormalizationAwareInterface;
1918

2019
class ChainEncoderTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
const FORMAT_1 = 'format1';
2522
const FORMAT_2 = 'format2';
2623
const FORMAT_3 = 'format3';
@@ -29,7 +26,7 @@ class ChainEncoderTest extends TestCase
2926
private $encoder1;
3027
private $encoder2;
3128

32-
private function doSetUp()
29+
protected function setUp()
3330
{
3431
$this->encoder1 = $this
3532
->getMockBuilder('Symfony\Component\Serializer\Encoder\EncoderInterface')

Tests/Encoder/CsvEncoderTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,19 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\CsvEncoder;
1716

1817
/**
1918
* @author Kévin Dunglas <dunglas@gmail.com>
2019
*/
2120
class CsvEncoderTest extends TestCase
2221
{
23-
use ForwardCompatTestTrait;
24-
2522
/**
2623
* @var CsvEncoder
2724
*/
2825
private $encoder;
2926

30-
private function doSetUp()
27+
protected function setUp()
3128
{
3229
$this->encoder = new CsvEncoder();
3330
}

Tests/Encoder/JsonDecodeTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,15 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\JsonDecode;
1716
use Symfony\Component\Serializer\Encoder\JsonEncoder;
1817

1918
class JsonDecodeTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
/** @var \Symfony\Component\Serializer\Encoder\JsonDecode */
2421
private $decode;
2522

26-
private function doSetUp()
23+
protected function setUp()
2724
{
2825
$this->decode = new JsonDecode();
2926
}

Tests/Encoder/JsonEncodeTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\JsonEncode;
1716
use Symfony\Component\Serializer\Encoder\JsonEncoder;
1817

1918
class JsonEncodeTest extends TestCase
2019
{
21-
use ForwardCompatTestTrait;
22-
2320
private $encoder;
2421

25-
private function doSetUp()
22+
protected function setUp()
2623
{
2724
$this->encode = new JsonEncode();
2825
}

Tests/Encoder/JsonEncoderTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\JsonEncoder;
1716
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
1817
use Symfony\Component\Serializer\Serializer;
1918

2019
class JsonEncoderTest extends TestCase
2120
{
22-
use ForwardCompatTestTrait;
23-
2421
private $encoder;
2522
private $serializer;
2623

27-
private function doSetUp()
24+
protected function setUp()
2825
{
2926
$this->encoder = new JsonEncoder();
3027
$this->serializer = new Serializer([new CustomNormalizer()], ['json' => new JsonEncoder()]);

Tests/Encoder/XmlEncoderTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Component\Serializer\Tests\Encoder;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1615
use Symfony\Component\Serializer\Encoder\XmlEncoder;
1716
use Symfony\Component\Serializer\Normalizer\CustomNormalizer;
1817
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
@@ -23,16 +22,14 @@
2322

2423
class XmlEncoderTest extends TestCase
2524
{
26-
use ForwardCompatTestTrait;
27-
2825
/**
2926
* @var XmlEncoder
3027
*/
3128
private $encoder;
3229

3330
private $exampleDateTimeString = '2017-02-19T15:16:08+0300';
3431

35-
private function doSetUp()
32+
protected function setUp()
3633
{
3734
$this->encoder = new XmlEncoder();
3835
$serializer = new Serializer([new CustomNormalizer()], ['xml' => new XmlEncoder()]);

0 commit comments

Comments
 (0)
0