1818 * @covers \Hyde\Pages\DocumentationPage
1919 * @covers \Hyde\Framework\Factories\Concerns\HasFactory
2020 * @covers \Hyde\Framework\Factories\NavigationDataFactory
21- * @covers \Hyde\Pages\Concerns\UsesFlattenedOutputPaths
2221 */
2322class DocumentationPageTest extends TestCase
2423{
@@ -32,9 +31,14 @@ public function test_can_get_current_page_path()
3231 {
3332 $ page = DocumentationPage::make ('foo ' );
3433 $ this ->assertEquals ('docs/foo ' , $ page ->getRouteKey ());
34+ }
3535
36+ public function test_can_get_current_custom_page_path ()
37+ {
3638 config (['hyde.output_directories.documentation-page ' => 'documentation/latest/ ' ]);
3739 (new HydeServiceProvider ($ this ->app ))->register ();
40+
41+ $ page = DocumentationPage::make ('foo ' );
3842 $ this ->assertEquals ('documentation/latest/foo ' , $ page ->getRouteKey ());
3943 }
4044
@@ -169,10 +173,10 @@ public function test_has_table_of_contents()
169173 $ this ->assertFalse (DocumentationPage::hasTableOfContents ());
170174 }
171175
172- public function test_compiled_pages_originating_in_subdirectories_get_output_to_root_docs_path ()
176+ public function test_compiled_pages_originating_in_subdirectories_retain_subdirectory_structure ()
173177 {
174178 $ page = DocumentationPage::make ('foo/bar ' );
175- $ this ->assertEquals ('docs/bar.html ' , $ page ->getOutputPath ());
179+ $ this ->assertEquals ('docs/foo/ bar.html ' , $ page ->getOutputPath ());
176180 }
177181
178182 public function test_page_has_front_matter ()
0 commit comments