Skip to content

Commit e377df5

Browse files
Merge branch '4.3' into 4.4
* 4.3: [Cache] fix cs Make tests support phpunit 8 Allow Travis CI to build on PHP 7.4
2 parents c4fb14a + c5d6274 commit e377df5

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

Tests/Command/LintCommandTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Yaml\Tests\Command;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Console\Application;
1617
use Symfony\Component\Console\Output\OutputInterface;
1718
use Symfony\Component\Console\Tester\CommandTester;
@@ -24,6 +25,8 @@
2425
*/
2526
class LintCommandTest extends TestCase
2627
{
28+
use ForwardCompatTestTrait;
29+
2730
private $files;
2831

2932
public function testLintCorrectFile()
@@ -127,13 +130,13 @@ protected function createCommandTester()
127130
return new CommandTester($command);
128131
}
129132

130-
protected function setUp()
133+
private function doSetUp()
131134
{
132135
$this->files = [];
133136
@mkdir(sys_get_temp_dir().'/framework-yml-lint-test');
134137
}
135138

136-
protected function tearDown()
139+
private function doTearDown()
137140
{
138141
foreach ($this->files as $file) {
139142
if (file_exists($file)) {

Tests/DumperTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@
1212
namespace Symfony\Component\Yaml\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Yaml\Dumper;
1617
use Symfony\Component\Yaml\Parser;
1718
use Symfony\Component\Yaml\Tag\TaggedValue;
1819
use Symfony\Component\Yaml\Yaml;
1920

2021
class DumperTest extends TestCase
2122
{
23+
use ForwardCompatTestTrait;
24+
2225
protected $parser;
2326
protected $dumper;
2427
protected $path;
@@ -38,14 +41,14 @@ class DumperTest extends TestCase
3841
],
3942
];
4043

41-
protected function setUp()
44+
private function doSetUp()
4245
{
4346
$this->parser = new Parser();
4447
$this->dumper = new Dumper();
4548
$this->path = __DIR__.'/Fixtures';
4649
}
4750

48-
protected function tearDown()
51+
private function doTearDown()
4952
{
5053
$this->parser = null;
5154
$this->dumper = null;

Tests/InlineTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@
1212
namespace Symfony\Component\Yaml\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Yaml\Exception\ParseException;
1617
use Symfony\Component\Yaml\Inline;
1718
use Symfony\Component\Yaml\Tag\TaggedValue;
1819
use Symfony\Component\Yaml\Yaml;
1920

2021
class InlineTest extends TestCase
2122
{
22-
protected function setUp()
23+
use ForwardCompatTestTrait;
24+
25+
private function doSetUp()
2326
{
2427
Inline::initialize(0, 0);
2528
}

Tests/ParserTest.php

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

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Yaml\Exception\ParseException;
1617
use Symfony\Component\Yaml\Parser;
1718
use Symfony\Component\Yaml\Tag\TaggedValue;
1819
use Symfony\Component\Yaml\Yaml;
1920

2021
class ParserTest extends TestCase
2122
{
23+
use ForwardCompatTestTrait;
24+
2225
/** @var Parser */
2326
protected $parser;
2427

0 commit comments

Comments
 (0)