From 6d9f60a744adc95c82a856cc9df19ceb0bf6b078 Mon Sep 17 00:00:00 2001 From: Lucas Michot Date: Wed, 13 Sep 2023 16:29:50 +0200 Subject: [PATCH] Update the visibility of setUp and tearDown --- tests/Foundation/Testing/TestCaseTest.php | 4 +++- tests/Hashing/HasherTest.php | 2 +- .../Console/Scheduling/SubMinuteSchedulingTest.php | 2 +- tests/Integration/Mail/SentMessageMailTest.php | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/Foundation/Testing/TestCaseTest.php b/tests/Foundation/Testing/TestCaseTest.php index 3611c3f9a6b3..76e16d75b35a 100644 --- a/tests/Foundation/Testing/TestCaseTest.php +++ b/tests/Foundation/Testing/TestCaseTest.php @@ -106,9 +106,11 @@ public function test_it_doesnt_fail_with_encoded_json() throw $exception; } - public function tearDown(): void + protected function tearDown(): void { ExampleTestCase::$latestResponse = null; + + parent::tearDown(); } } diff --git a/tests/Hashing/HasherTest.php b/tests/Hashing/HasherTest.php index 6b1bef6f0c15..19a33b93d84f 100755 --- a/tests/Hashing/HasherTest.php +++ b/tests/Hashing/HasherTest.php @@ -15,7 +15,7 @@ class HasherTest extends TestCase { public $hashManager; - public function setUp(): void + protected function setUp(): void { parent::setUp(); diff --git a/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php b/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php index ebefc4ff6e43..bc7b98d5b1b4 100644 --- a/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php +++ b/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php @@ -12,7 +12,7 @@ class SubMinuteSchedulingTest extends TestCase { protected Schedule $schedule; - public function setUp(): void + protected function setUp(): void { parent::setUp(); diff --git a/tests/Integration/Mail/SentMessageMailTest.php b/tests/Integration/Mail/SentMessageMailTest.php index 64c13e5223d8..af72a6c33159 100644 --- a/tests/Integration/Mail/SentMessageMailTest.php +++ b/tests/Integration/Mail/SentMessageMailTest.php @@ -14,7 +14,7 @@ class SentMessageMailTest extends TestCase { - public function setUp(): void + protected function setUp(): void { parent::setUp();