Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize route and raw_route, fix empty route as values #3184

Merged
merged 9 commits into from
Feb 8, 2021
Prev Previous commit
add test for multiple parts using folder
  • Loading branch information
pierrejoye committed Feb 2, 2021
commit 6c3c068485cda5e85cd34e9346091affb084048e
12 changes: 12 additions & 0 deletions tests/unit/Grav/Common/Page/PagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,18 @@ public function testTranslatedLanguages(): void
$this->assertSame(["en" => "/page-translated", "fr" => "/page-translated"], $translatedLanguages);
}

public function testLongPathTranslatedLanguages(): void
{
/** @var UniformResourceLocator $locator */
$locator = $this->grav['locator'];
$folder = $locator->findResource('tests://');
$page = $this->pages->get($folder . '/fake/simple-site/user/pages/05.translatedlong/part2');
$this->assertInstanceOf(PageInterface::class, $page);
$translatedLanguages = $page->translatedLanguages();
$this->assertIsArray($translatedLanguages);
$this->assertSame(["en" => "/translatedlong/part2", "fr" => "/translatedlong/part2"], $translatedLanguages);
}

public function testGetTypes(): void
{
}
Expand Down