Skip to content

Commit

Permalink
Update test to use mocking helper
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Sep 8, 2024
1 parent 880eebe commit cad6f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/framework/tests/Unit/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ protected function setUp(): void
{
self::setupKernel();
self::mockConfig();
Render::swap(new RenderData());
self::mockCurrentRouteKey();
}

public function testConstructorCreatesRouteFromPageModel()
Expand Down Expand Up @@ -80,7 +80,7 @@ public function testGetLinkReturnsCorrectPathForNestedPages()
public function testGetLinkReturnsCorrectPathForNestedCurrentPage()
{
$route = new Route(new MarkdownPage('foo'));
Render::shouldReceive('getRouteKey')->andReturn('foo/bar');
self::mockCurrentRouteKey('foo/bar');

$this->assertSame(Hyde::relativeLink($route->getOutputPath()), $route->getLink());
$this->assertSame('../foo.html', $route->getLink());
Expand Down

0 comments on commit cad6f55

Please sign in to comment.