Skip to content

Commit a40409c

Browse files
committed
Fix phpunit config for V6
1 parent 41a3864 commit a40409c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
processIsolation="true"
1010
stopOnFailure="false"
1111
syntaxCheck="false"
12-
bootstrap="vendor/autoload.php"
12+
bootstrap="tests/bootstrap.php"
1313
>
1414
<testsuites>
1515
<testsuite name="Yii2 Config Test Suite">

tests/bootstrap.php

+9
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
11
<?php
2+
require __DIR__ . '/../vendor/autoload.php';
3+
4+
// Some travis environments use phpunit > 6
5+
$newClass = '\PHPUnit\Framework\TestCase';
6+
$oldClass = '\PHPUnit_Framework_TestCase';
7+
if (!class_exists($newClass) && class_exists($oldClass)) {
8+
class_alias($oldClass, $newClass);
9+
}
10+

0 commit comments

Comments
 (0)