* 1.x:
Length filter non-mb_string on 7.x fix.
fixed code for older versions of PHP
bumped version to 1.34
Support PHPUnit 6 for testing extensions
added PHP 7.2 to the test matrix
... | ... |
@@ -14,6 +14,7 @@ matrix: |
14 | 14 |
dist: trusty |
15 | 15 |
- php: 7.0 |
16 | 16 |
- php: 7.1 |
17 |
+ - php: nightly |
|
17 | 18 |
allow_failures: |
18 | 19 |
- php: hhvm-stable |
19 | 20 |
fast_finish: true |
... | ... |
@@ -24,3 +25,5 @@ before_install: |
24 | 25 |
|
25 | 26 |
install: |
26 | 27 |
- travis_retry composer install |
28 |
+ |
|
29 |
+script: ./vendor/bin/simple-phpunit |
... | ... |
@@ -9,13 +9,15 @@ |
9 | 9 |
* file that was distributed with this source code. |
10 | 10 |
*/ |
11 | 11 |
|
12 |
+use PHPUnit\Framework\TestCase; |
|
13 |
+ |
|
12 | 14 |
/** |
13 | 15 |
* Integration test helper. |
14 | 16 |
* |
15 | 17 |
* @author Fabien Potencier <fabien@symfony.com> |
16 | 18 |
* @author Karma Dordrak <drak@zikula.org> |
17 | 19 |
*/ |
18 |
-abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase |
|
20 |
+abstract class Twig_Test_IntegrationTestCase extends TestCase |
|
19 | 21 |
{ |
20 | 22 |
/** |
21 | 23 |
* @return string |
... | ... |
@@ -193,7 +195,8 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase |
193 | 195 |
|
194 | 196 |
if (false !== $exception) { |
195 | 197 |
list($class) = explode(':', $exception); |
196 |
- $this->assertThat(null, new PHPUnit_Framework_Constraint_Exception($class)); |
|
198 |
+ $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception'; |
|
199 |
+ $this->assertThat(null, new $constraintClass($class)); |
|
197 | 200 |
} |
198 | 201 |
|
199 | 202 |
$expected = trim($match[3], "\n "); |
... | ... |
@@ -1,5 +1,7 @@ |
1 | 1 |
<?php |
2 | 2 |
|
3 |
+use PHPUnit\Framework\TestCase; |
|
4 |
+ |
|
3 | 5 |
/* |
4 | 6 |
* This file is part of Twig. |
5 | 7 |
* |
... | ... |
@@ -8,7 +10,7 @@ |
8 | 10 |
* For the full copyright and license information, please view the LICENSE |
9 | 11 |
* file that was distributed with this source code. |
10 | 12 |
*/ |
11 |
-abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase |
|
13 |
+abstract class Twig_Test_NodeTestCase extends TestCase |
|
12 | 14 |
{ |
13 | 15 |
abstract public function getTests(); |
14 | 16 |
|