From 5419d4428c86c488a43124f85e5407d7cbae6541 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 14 Apr 2024 15:17:47 +0200 Subject: Adding upstream version 1.11.1. Signed-off-by: Daniel Baumann --- .../PropertyModifier/PropertyModifierParseURLTest.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'test/php/library/Director/PropertyModifier/PropertyModifierParseURLTest.php') 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', -- cgit v1.2.3