test: add compatibility layer for phpunit

This commit is contained in:
Thomas Gelf 2017-02-08 16:42:00 +01:00
parent f4339e6b1a
commit f2bbd2d5d7
2 changed files with 13 additions and 0 deletions

View File

@ -4,6 +4,9 @@ use Icinga\Module\Director\Test\Bootstrap;
call_user_func(function () { call_user_func(function () {
$basedir = dirname(__DIR__); $basedir = dirname(__DIR__);
if (! class_exists('PHPUnit_Framework_TestCase')) {
require_once __DIR__ . '/phpunit-compat.php';
}
require_once $basedir . '/library/Director/Test/Bootstrap.php'; require_once $basedir . '/library/Director/Test/Bootstrap.php';
Bootstrap::cli($basedir); Bootstrap::cli($basedir);
}); });

10
test/phpunit-compat.php Normal file
View File

@ -0,0 +1,10 @@
<?php
use PHPUnit\Framework\TestCase;
/**
* @codingStandardsIgnoreStart
*/
class PHPUnit_Framework_TestCase extends TestCase
{
}