diff --git a/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php b/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php index 14b18821ce3..bc3a1f0061f 100644 --- a/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php +++ b/packages/framework/tests/Unit/Foundation/HyperlinksUrlPathHelpersTest.php @@ -4,6 +4,7 @@ namespace Hyde\Framework\Testing\Unit\Foundation; +use BadMethodCallException; use Hyde\Foundation\HydeKernel; use Hyde\Foundation\Kernel\Hyperlinks; use Hyde\Testing\TestCase; @@ -153,11 +154,14 @@ public function testQualifiedUrlHelperWithAlreadyQualifiedUrlStillFormatsPathWit $this->assertSame('http://localhost/foo/bar', $this->class->url('http://localhost/foo/bar/')); } - public function testQualifiedUrlReturnsNullWhenNoSiteUrlIsSet() + public function testQualifiedUrlThrowsExceptionWhenNoSiteUrlIsSet() { $this->withSiteUrl(null); - $this->assertNull($this->class->url()); + $this->expectException(BadMethodCallException::class); + $this->expectExceptionMessage('The site URL is not set in the configuration.'); + + $this->class->url(); } public function testHelperFallsBackToRelativeLinksWhenNoSiteUrlIsSet()