Skip to content

Commit 0bfae2a

Browse files
Merge branch '3.4' into 4.3
* 3.4: cs fix Replace calls to setExpectedException by Pollyfill
2 parents ce4194e + 11bfea7 commit 0bfae2a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Tests/Util/GitRepositoryTest.php

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

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Bridge\PhpUnit\ForwardCompatTestTrait;
1516
use Symfony\Component\Filesystem\Filesystem;
1617
use Symfony\Component\Intl\Exception\RuntimeException;
1718
use Symfony\Component\Intl\Util\GitRepository;
@@ -21,6 +22,8 @@
2122
*/
2223
class GitRepositoryTest extends TestCase
2324
{
25+
use ForwardCompatTestTrait;
26+
2427
private $targetDir;
2528

2629
const REPO_URL = 'https://github.com/symfony/intl.git';
@@ -39,11 +42,7 @@ protected function cleanup()
3942

4043
public function testItThrowsAnExceptionIfInitialisedWithNonGitDirectory()
4144
{
42-
if (method_exists($this, 'expectException')) {
43-
$this->expectException(RuntimeException::class);
44-
} else {
45-
$this->setExpectedException(RuntimeException::class);
46-
}
45+
$this->expectException(RuntimeException::class);
4746

4847
@mkdir($this->targetDir, 0777, true);
4948

0 commit comments

Comments
 (0)