mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-08 16:36:58 +00:00
Simplify code
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Twig\Test;
|
||||
|
||||
use PHPUnit\Framework\Constraint\Exception;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Twig\Environment;
|
||||
use Twig\Error\Error;
|
||||
@@ -235,8 +236,7 @@ abstract class IntegrationTestCase extends TestCase
|
||||
|
||||
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 ");
|
||||
|
||||
Reference in New Issue
Block a user