Skip to content

Commit

Permalink
Remove internal DocumentationSearchPage::routeKey() method
Browse files Browse the repository at this point in the history
This is now no longer needed thanks to #1498, but is kept as protected so the `enabled` method can use it
  • Loading branch information
caendesilva committed Dec 15, 2023
1 parent 9c10059 commit 0838ab4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public static function enabled(): bool
return Config::getBool('docs.create_search_page', true) && ! Hyde::routes()->has(self::routeKey());
}

/** @deprecated Can be removed by https://github.com/hydephp/develop/pull/1498 */
public static function routeKey(): string
protected static function routeKey(): string
{
return ltrim(DocumentationPage::outputDirectory().'/search');
}
Expand Down
11 changes: 0 additions & 11 deletions packages/framework/tests/Feature/DocumentationSearchPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,4 @@ public function testEnabledIsFalseWhenDisabledAndRouteExists()
Hyde::routes()->put('docs/search', new InMemoryPage('docs/search'));
$this->assertFalse(DocumentationSearchPage::enabled());
}

public function testStaticRouteKeyHelper()
{
$this->assertSame('docs/search', DocumentationSearchPage::routeKey());
}

public function testStaticRouteKeyHelperWithCustomOutputDirectory()
{
DocumentationPage::setOutputDirectory('foo');
$this->assertSame('foo/search', DocumentationSearchPage::routeKey());
}
}

0 comments on commit 0838ab4

Please sign in to comment.