[PhpUnitBridge] more fixes for PHP 5.5
This commit is contained in:
parent
5274edaa86
commit
3a520f2813
@ -249,7 +249,7 @@ class Deprecation
|
|||||||
foreach (get_declared_classes() as $class) {
|
foreach (get_declared_classes() as $class) {
|
||||||
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
||||||
$r = new \ReflectionClass($class);
|
$r = new \ReflectionClass($class);
|
||||||
$v = \dirname($r->getFileName(), 2);
|
$v = \dirname(\dirname($r->getFileName()));
|
||||||
if (file_exists($v.'/composer/installed.json')) {
|
if (file_exists($v.'/composer/installed.json')) {
|
||||||
self::$vendors[] = $v;
|
self::$vendors[] = $v;
|
||||||
$loader = require $v.'/autoload.php';
|
$loader = require $v.'/autoload.php';
|
||||||
|
@ -29,7 +29,7 @@ class DeprecationTest extends TestCase
|
|||||||
{
|
{
|
||||||
$r = new \ReflectionClass(Deprecation::class);
|
$r = new \ReflectionClass(Deprecation::class);
|
||||||
|
|
||||||
if (dirname($r->getFileName(), 2) !== dirname(__DIR__, 2)) {
|
if (\dirname(\dirname($r->getFileName())) !== \dirname(\dirname(__DIR__))) {
|
||||||
$this->markTestSkipped('Test case is not compatible with having the bridge in vendor/');
|
$this->markTestSkipped('Test case is not compatible with having the bridge in vendor/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user