From b1b5412150668f9a90c482825ff14f68b9adb217 Mon Sep 17 00:00:00 2001 From: Chris Morrell Date: Mon, 6 Dec 2021 14:47:57 -0500 Subject: [PATCH 1/2] Use `@before` and `@after` annotations in TestCase --- src/Illuminate/Foundation/Testing/TestCase.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Testing/TestCase.php b/src/Illuminate/Foundation/Testing/TestCase.php index 35af3d49bc0e..881cddf41bc3 100644 --- a/src/Illuminate/Foundation/Testing/TestCase.php +++ b/src/Illuminate/Foundation/Testing/TestCase.php @@ -76,9 +76,10 @@ abstract public function createApplication(); /** * Setup the test environment. * + * @before * @return void */ - protected function setUp(): void + protected function setUpLaravelApplication(): void { Facade::clearResolvedInstances(); @@ -148,11 +149,12 @@ protected function setUpTraits() /** * Clean up the testing environment before the next test. * + * @after * @return void * * @throws \Mockery\Exception\InvalidCountException */ - protected function tearDown(): void + protected function tearDownLaravelApplication(): void { if ($this->app) { $this->callBeforeApplicationDestroyedCallbacks(); From 4b8ebd9e6daa35c369606ace8974f193f83d2e0b Mon Sep 17 00:00:00 2001 From: Chris Morrell Date: Mon, 6 Dec 2021 16:15:09 -0500 Subject: [PATCH 2/2] StyleCI --- src/Illuminate/Foundation/Testing/TestCase.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Illuminate/Foundation/Testing/TestCase.php b/src/Illuminate/Foundation/Testing/TestCase.php index 881cddf41bc3..b9a44a067641 100644 --- a/src/Illuminate/Foundation/Testing/TestCase.php +++ b/src/Illuminate/Foundation/Testing/TestCase.php @@ -77,6 +77,7 @@ abstract public function createApplication(); * Setup the test environment. * * @before + * * @return void */ protected function setUpLaravelApplication(): void @@ -150,6 +151,7 @@ protected function setUpTraits() * Clean up the testing environment before the next test. * * @after + * * @return void * * @throws \Mockery\Exception\InvalidCountException