Skip to content

Commit

Permalink
Merge pull request #226 from hydephp/improve-router
Browse files Browse the repository at this point in the history
Add missing test
  • Loading branch information
caendesilva committed Jul 15, 2022
2 parents be56398 + 016a047 commit e17efa8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/framework/tests/Feature/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,11 @@ public function test_get_link_returns_pretty_url_if_enabled()
$this->assertEquals(Hyde::relativeLink($route->getOutputFilePath()), $route->getLink());
$this->assertEquals('foo', $route->getLink());
}

// test to string is alias for getLink
public function test_to_string_is_alias_for_get_link()
{
$route = new Route(new MarkdownPage(slug: 'foo'));
$this->assertEquals($route->getLink(), (string) $route);
}
}

0 comments on commit e17efa8

Please sign in to comment.