From f2bbd2d5d7af13017b2e9353df6b6877aac6aa2d Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 8 Feb 2017 16:42:00 +0100 Subject: [PATCH] test: add compatibility layer for phpunit --- test/bootstrap.php | 3 +++ test/phpunit-compat.php | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test/phpunit-compat.php diff --git a/test/bootstrap.php b/test/bootstrap.php index 849af319..fa27e2e3 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -4,6 +4,9 @@ use Icinga\Module\Director\Test\Bootstrap; call_user_func(function () { $basedir = dirname(__DIR__); + if (! class_exists('PHPUnit_Framework_TestCase')) { + require_once __DIR__ . '/phpunit-compat.php'; + } require_once $basedir . '/library/Director/Test/Bootstrap.php'; Bootstrap::cli($basedir); }); diff --git a/test/phpunit-compat.php b/test/phpunit-compat.php new file mode 100644 index 00000000..2b1be3a0 --- /dev/null +++ b/test/phpunit-compat.php @@ -0,0 +1,10 @@ +