From c4bdd6e49451c80220ff0a9140338b696ebe9862 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Fri, 10 Jul 2020 14:13:23 -0400 Subject: [PATCH] Avoid naming conflict between CustomPost in ModelTest and CustomPost in PostTest --- tests/integration/extenders/ModelTest.php | 4 ++-- tests/integration/extenders/PostTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/extenders/ModelTest.php b/tests/integration/extenders/ModelTest.php index dc0629332a1..5bfa53ef690 100644 --- a/tests/integration/extenders/ModelTest.php +++ b/tests/integration/extenders/ModelTest.php @@ -326,7 +326,7 @@ public function custom_default_attribute_inheritance_prioritizes_child_class() $this->app(); - $post = new CustomPost; + $post = new ModelTestCustomPost; $this->assertEquals(42, $post->answer); @@ -416,7 +416,7 @@ public function custom_date_attribute_doesnt_work_if_set_on_unrelated_model() } } -class CustomPost extends AbstractEventPost +class ModelTestCustomPost extends AbstractEventPost { /** * {@inheritdoc} diff --git a/tests/integration/extenders/PostTest.php b/tests/integration/extenders/PostTest.php index dc79b320edd..a91f12d77b9 100644 --- a/tests/integration/extenders/PostTest.php +++ b/tests/integration/extenders/PostTest.php @@ -30,7 +30,7 @@ public function custom_post_type_doesnt_exist_by_default() */ public function custom_post_type_exists_if_added() { - $this->extend((new Extend\Post)->type(CustomPost::class)); + $this->extend((new Extend\Post)->type(PostTestCustomPost::class)); // Needed for extenders to be booted $this->app(); @@ -39,7 +39,7 @@ public function custom_post_type_exists_if_added() } } -class CustomPost extends AbstractEventPost implements MergeableInterface +class PostTestCustomPost extends AbstractEventPost implements MergeableInterface { /** * {@inheritdoc}