icingaweb2-module-businessp.../library/Businessprocess/Web/Url.php
Alexander A. Klimov 15cc3e88e0 Require Icinga Web 2.5.1
refs #113
2018-08-01 09:37:59 +02:00

26 lines
505 B
PHP

<?php
namespace Icinga\Module\Businessprocess\Web;
use Icinga\Application\Icinga;
use Icinga\Web\Url as WebUrl;
/**
* Class Url
*
* The main purpose of this class is to get unit tests running on CLI
*
* @package Icinga\Module\Businessprocess\Web
*/
class Url extends WebUrl
{
protected static function getRequest()
{
$app = Icinga::app();
if ($app->isCli()) {
return new FakeRequest();
} else {
return $app->getRequest();
}
}
}