diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e21d4b9..3202e6c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,7 +9,7 @@ > - ./tests/integration + ./tests/integration diff --git a/src/plugin.php b/src/plugin.php index 3fb43a3..8dd7d30 100755 --- a/src/plugin.php +++ b/src/plugin.php @@ -543,7 +543,7 @@ public function set_home_template_hierarchy(array $templates): array return $templates; } return \array_merge([ - "home-{$GLOBALS['wp_query']->{self::QUERY_VAR_IS_PFCPT}}", + "home-{$GLOBALS['wp_query']->{self::QUERY_VAR_IS_PFCPT}}.php", ], $templates); } diff --git a/tests/integration/test-page-for-custom-post-type.php b/tests/integration/PageForCustomPostTypeTest.php similarity index 98% rename from tests/integration/test-page-for-custom-post-type.php rename to tests/integration/PageForCustomPostTypeTest.php index 034669f..3b704fb 100644 --- a/tests/integration/test-page-for-custom-post-type.php +++ b/tests/integration/PageForCustomPostTypeTest.php @@ -7,7 +7,7 @@ use n5s\PageForCustomPostType\Plugin; use Yoast\WP\SEO\Memoizers\Meta_Tags_Context_Memoizer; -class TestPageForCustomPostType extends Testkit_Test_Case +class PageForCustomPostTypeTest extends Testkit_Test_Case { private string $home_for_book_title = 'Home for Books'; @@ -62,7 +62,7 @@ public function test_query() $hierarchy = new Hierarchy(); $this->assertEquals([ 'home' => [ - "home-{$this->book_post_type}", + "home-{$this->book_post_type}.php", 'home', 'index', ],