summaryrefslogtreecommitdiffstats
path: root/test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:17:47 +0000
commit5419d4428c86c488a43124f85e5407d7cbae6541 (patch)
tree772c4221a20fd7d1b3e7e67c6e21755a50e80fd7 /test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php
parentAdding upstream version 1.10.2. (diff)
downloadicingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.tar.xz
icingaweb2-module-director-5419d4428c86c488a43124f85e5407d7cbae6541.zip
Adding upstream version 1.11.1.upstream/1.11.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php')
-rw-r--r--test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php b/test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php
index a5ccb79..fe89ac6 100644
--- a/test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php
+++ b/test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php
@@ -2,6 +2,7 @@
namespace Tests\Icinga\Module\Director\PropertyModifier;
+use Icinga\Exception\InvalidPropertyException;
use Icinga\Module\Director\PropertyModifier\PropertyModifierParseURL;
use Icinga\Module\Director\Test\BaseTestCase;
@@ -50,11 +51,10 @@ class PropertyModifierParseURLTest extends BaseTestCase
$this->assertEquals('http://www.icinga.org/path/', $modifier->transform('http://www.icinga.org/path/'));
}
- /**
- * @expectedException \Icinga\Exception\InvalidPropertyException
- */
public function testMissingComponentThrowsExceptionOnfailureFail()
{
+ $this->expectException(InvalidPropertyException::class);
+
$modifier = new PropertyModifierParseURL();
$modifier->setSettings([
'url_component' => 'query',
@@ -87,11 +87,10 @@ class PropertyModifierParseURLTest extends BaseTestCase
$this->assertEquals(self::$invalidurl, $modifier->transform(self::$invalidurl));
}
- /**
- * @expectedException \Icinga\Exception\InvalidPropertyException
- */
public function testInvalidUrlThrowsExceptionOnfailureFail()
{
+ $this->expectException(InvalidPropertyException::class);
+
$modifier = new PropertyModifierParseURL();
$modifier->setSettings([
'url_component' => 'host',