Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 9, 2023
1 parent aa4b59c commit a64561b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Test/IntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Twig\Test;

use PHPUnit\Framework\Constraint\Exception;
use PHPUnit\Framework\TestCase;
use Twig\Environment;
use Twig\Error\Error;
Expand Down Expand Up @@ -235,8 +236,7 @@ protected function doIntegrationTest($file, $message, $condition, $templates, $e

if (false !== $exception) {
[$class] = explode(':', $exception);
$constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception';
$this->assertThat(null, new $constraintClass($class));
$this->assertThat(null, new Exception($class));
}

$expected = trim($match[3], "\n ");
Expand Down

0 comments on commit a64561b

Please sign in to comment.