mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-30 12:06:56 +00:00
Support PHPUnit 6 for testing extensions
This commit is contained in:
@@ -9,13 +9,16 @@
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit\Framework\Constraint\Exception as ExceptionConstraint;
|
||||
|
||||
/**
|
||||
* Integration test helper.
|
||||
*
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
* @author Karma Dordrak <drak@zikula.org>
|
||||
*/
|
||||
abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
|
||||
abstract class Twig_Test_IntegrationTestCase extends TestCase
|
||||
{
|
||||
/**
|
||||
* @return string
|
||||
@@ -196,7 +199,8 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
|
||||
|
||||
if (false !== $exception) {
|
||||
list($class) = explode(':', $exception);
|
||||
$this->assertThat(null, new PHPUnit_Framework_Constraint_Exception($class));
|
||||
$constraintClass = class_exists(ExceptionConstraint::class) ? ExceptionConstraint::class : \PHPUnit_Framework_Constraint_Exception::class;
|
||||
$this->assertThat(null, new $constraintClass($class));
|
||||
}
|
||||
|
||||
$expected = trim($match[3], "\n ");
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/*
|
||||
* This file is part of Twig.
|
||||
*
|
||||
@@ -8,7 +10,7 @@
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase
|
||||
abstract class Twig_Test_NodeTestCase extends TestCase
|
||||
{
|
||||
abstract public function getTests();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user