diff options
Diffstat (limited to 'library/Eventdb/Test/BaseTestCase.php')
-rw-r--r-- | library/Eventdb/Test/BaseTestCase.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/library/Eventdb/Test/BaseTestCase.php b/library/Eventdb/Test/BaseTestCase.php new file mode 100644 index 0000000..d24ea49 --- /dev/null +++ b/library/Eventdb/Test/BaseTestCase.php @@ -0,0 +1,27 @@ +<?php + +namespace Icinga\Module\Eventdb\Test; + +use Icinga\Application\Icinga; +use PHPUnit_Framework_TestCase; + +abstract class BaseTestCase extends PHPUnit_Framework_TestCase +{ + private static $app; + + private $db; + + public function setUp() + { + $this->app(); + } + + protected function app() + { + if (self::$app === null) { + self::$app = Icinga::app(); + } + + return self::$app; + } +} |