Skip to content

Commit

Permalink
Update HyperlinksUrlPathHelpersTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jul 23, 2024
1 parent e9666cb commit aa15d79
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit aa15d79

Please sign in to comment.