mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
tests: Require view helpers at runtime
This commit is contained in:
parent
e7adc06497
commit
c9f3f0444d
@ -3,13 +3,22 @@
|
||||
|
||||
namespace Tests\Icinga\Module\Monitoring\Application\Views\Helpers;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Zend_View_Helper_MonitoringFlags;
|
||||
use Icinga\Test\BaseTestCase;
|
||||
|
||||
require_once realpath(BaseTestCase::$moduleDir . '/monitoring/application/views/helpers/MonitoringFlags.php');
|
||||
|
||||
class MonitoringFlagsTest extends BaseTestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
require_once realpath(
|
||||
Icinga::app()->getModuleManager()->getModuleDir('monitoring')
|
||||
. '/application/views/helpers/MonitoringFlags.php'
|
||||
);
|
||||
}
|
||||
|
||||
public function testHosts1()
|
||||
{
|
||||
$testArray = array(
|
||||
|
@ -3,12 +3,11 @@
|
||||
|
||||
namespace Tests\Icinga\Module\Monitoring\Application\Views\Helpers;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Icinga\Web\View;
|
||||
use Zend_View_Helper_PluginOutput;
|
||||
use Icinga\Test\BaseTestCase;
|
||||
|
||||
require_once realpath(BaseTestCase::$moduleDir . '/monitoring/application/views/helpers/PluginOutput.php');
|
||||
|
||||
class PluginOutputTest extends BaseTestCase
|
||||
{
|
||||
/** @var Zend_View_Helper_PluginOutput */
|
||||
@ -24,6 +23,11 @@ class PluginOutputTest extends BaseTestCase
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
require_once realpath(
|
||||
Icinga::app()->getModuleManager()->getModuleDir('monitoring')
|
||||
. '/application/views/helpers/PluginOutput.php'
|
||||
);
|
||||
|
||||
$this->helper = $h = new Zend_View_Helper_PluginOutput;
|
||||
$h->setView(new View());
|
||||
}
|
||||
|
@ -7,8 +7,6 @@ use Mockery;
|
||||
use Icinga\Test\BaseTestCase;
|
||||
use Icinga\Module\Monitoring\Object\Macro;
|
||||
|
||||
require_once realpath(BaseTestCase::$moduleDir . '/monitoring/library/Monitoring/Object/Macro.php');
|
||||
|
||||
class MacroTest extends BaseTestCase
|
||||
{
|
||||
public function testHostMacros()
|
||||
|
@ -3,14 +3,23 @@
|
||||
|
||||
namespace Tests\Icinga\Web\Paginator\ScrollingStyle;
|
||||
|
||||
use Icinga\Application\Icinga;
|
||||
use Mockery;
|
||||
use Zend_Paginator;
|
||||
use Icinga\Test\BaseTestCase;
|
||||
|
||||
require_once realpath(BaseTestCase::$libDir . '/Web/Paginator/ScrollingStyle/SlidingWithBorder.php');
|
||||
|
||||
class SlidingwithborderTest extends BaseTestCase
|
||||
class SlidingWithborderTest extends BaseTestCase
|
||||
{
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
require_once realpath(
|
||||
Icinga::app()->getLibraryDir('Icinga')
|
||||
. '/Web/Paginator/ScrollingStyle/SlidingWithBorder.php'
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetPages2()
|
||||
{
|
||||
$scrollingStyle = new \Icinga_Web_Paginator_ScrollingStyle_SlidingWithBorder();
|
||||
|
Loading…
x
Reference in New Issue
Block a user