Skip to content

Commit 9e8a04f

Browse files
committed
Skip custom route key test on Laravel 6 and below
1 parent 5f52765 commit 9e8a04f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tests/Unit/Macros/LocalizedUrlMacroTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ public function it_generates_urls_with_default_localized_route_keys_for_the_curr
5252
/** @test */
5353
public function it_generates_urls_with_custom_localized_route_keys_for_the_current_route_using_route_model_binding()
5454
{
55+
if (App::version() < 7) {
56+
$this->markTestSkipped('This feature is only available in Laravel 7 and newer.');
57+
}
58+
5559
$this->withoutExceptionHandling();
5660
$this->setSupportedLocales(['en', 'nl']);
5761

tests/Unit/RouteModelBindingTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ public function it_loads_a_route_with_a_localized_route_key_based_on_the_active_
4545
/** @test */
4646
public function it_loads_a_route_with_a_custom_localized_route_key_based_on_the_active_locale()
4747
{
48+
if (App::version() < 7) {
49+
$this->markTestSkipped('This feature is only available in Laravel 7 and newer.');
50+
}
51+
4852
$this->setSupportedLocales(['en', 'nl']);
4953
$this->setUseLocaleMiddleware(true);
5054

tests/Unit/UrlGeneratorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ public function it_generates_a_url_for_a_route_with_a_default_localized_route_ke
188188
/** @test */
189189
public function it_generates_a_url_for_a_route_with_a_custom_localized_route_key()
190190
{
191+
if (App::version() < 7) {
192+
$this->markTestSkipped('This feature is only available in Laravel 7 and newer.');
193+
}
194+
191195
$this->setSupportedLocales(['en', 'nl']);
192196
$this->setAppLocale('en');
193197

0 commit comments

Comments
 (0)