Skip to content

Commit

Permalink
Update test code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed May 20, 2022
1 parent 9ba7b10 commit 1a9dcaf
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions tests/Feature/Concerns/HasPageMetadataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ protected function setUp(): void
config(['hyde.generateSitemap' => false]);
}

public function testGetCanonicalUrlReturnsUrlForTopLevelPage()
public function test_get_canonical_url_returns_url_for_top_level_page()
{
$page = new class extends AbstractPage
{
Expand All @@ -36,7 +36,7 @@ public function testGetCanonicalUrlReturnsUrlForTopLevelPage()
$this->assertEquals('https://example.com/foo.html', $page->getCanonicalUrl());
}

public function testGetCanonicalUrlReturnsPrettyUrlForTopLevelPage()
public function test_get_canonical_url_returns_pretty_url_for_top_level_page()
{
$page = new class extends AbstractPage
{
Expand All @@ -50,7 +50,7 @@ public function testGetCanonicalUrlReturnsPrettyUrlForTopLevelPage()
$this->assertEquals('https://example.com/foo', $page->getCanonicalUrl());
}

public function testGetCanonicalUrlReturnsUrlForNestedPage()
public function test_get_canonical_url_returns_url_for_nested_page()
{
$page = new class extends AbstractPage
{
Expand All @@ -68,7 +68,7 @@ public function getCurrentPagePath(): string
$this->assertEquals('https://example.com/bar/foo.html', $page->getCanonicalUrl());
}

public function testGetCanonicalUrlReturnsUrlForDeeplyNestedPage()
public function test_get_canonical_url_returns_url_for_deeply_nested_page()
{
$page = new class extends AbstractPage
{
Expand All @@ -86,7 +86,7 @@ public function getCurrentPagePath(): string
$this->assertEquals('https://example.com/bar/baz/foo.html', $page->getCanonicalUrl());
}

public function testCanUseCanonicalUrlReturnsTrueWhenBothUriPathAndSlugIsSet()
public function test_can_use_canonical_url_returns_true_when_both_uri_path_and_slug_is_set()
{
$page = new class extends AbstractPage
{
Expand All @@ -99,7 +99,7 @@ public function testCanUseCanonicalUrlReturnsTrueWhenBothUriPathAndSlugIsSet()
$this->assertTrue($page->canUseCanonicalUrl());
}

public function testCanUseCanonicalUrlReturnsFalseNoConditionsAreMet()
public function test_can_use_canonical_url_returns_false_no_conditions_are_met()
{
$page = new class extends AbstractPage
{
Expand All @@ -111,7 +111,7 @@ public function testCanUseCanonicalUrlReturnsFalseNoConditionsAreMet()
$this->assertFalse($page->canUseCanonicalUrl());
}

public function testCanUseCanonicalUrlReturnsFalseWhenOnlyOneConditionIsMet()
public function test_can_use_canonical_url_returns_false_when_only_one_condition_is_met()
{
$page = new class extends AbstractPage
{
Expand All @@ -134,7 +134,7 @@ public function testCanUseCanonicalUrlReturnsFalseWhenOnlyOneConditionIsMet()
$this->assertFalse($page->canUseCanonicalUrl());
}

public function testRenderPageMetadataReturnsStringWithMergedMetadata()
public function test_render_page_metadata_returns_string_with_merged_metadata()
{
$page = new class extends AbstractPage
{
Expand All @@ -155,7 +155,7 @@ public function testRenderPageMetadataReturnsStringWithMergedMetadata()
);
}

public function testRenderPageMetadataOnlyAddsCanonicalIfConditionsAreMet()
public function test_render_page_metadata_only_adds_canonical_if_conditions_are_met()
{
$page = new class extends AbstractPage
{
Expand All @@ -170,7 +170,7 @@ public function testRenderPageMetadataOnlyAddsCanonicalIfConditionsAreMet()
);
}

public function testGetDynamicMetadataOnlyAddsCanonicalIfConditionsAreMet()
public function test_get_dynamic_metadata_only_adds_canonical_if_conditions_are_met()
{
$page = new class extends AbstractPage
{
Expand All @@ -185,7 +185,7 @@ public function testGetDynamicMetadataOnlyAddsCanonicalIfConditionsAreMet()
);
}

public function testGetDynamicMetadataAddsCanonicalUrlWhenConditionsAreMet()
public function test_get_dynamic_metadata_adds_canonical_url_when_conditions_are_met()
{
$page = new class extends AbstractPage
{
Expand All @@ -204,9 +204,7 @@ public function testGetDynamicMetadataAddsCanonicalUrlWhenConditionsAreMet()
);
}



public function testGetDynamicMetadataAddsSitemapLinkWhenConditionsAreMet()
public function test_get_dynamic_metadata_adds_sitemap_link_when_conditions_are_met()
{
$page = new class extends AbstractPage
{
Expand Down

0 comments on commit 1a9dcaf

Please sign in to comment.