File: BaseTestCase.php

package info (click to toggle)
icingaweb2-module-eventdb 1.3.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,040 kB
  • sloc: php: 2,044; sh: 105; javascript: 85; xml: 18; makefile: 16
file content (27 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
    }
}