From b7ee522d86adf5367bfe1aa3cb1b696d4b1a0b70 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 11 Aug 2019 19:10:27 +0800 Subject: [PATCH] Attempt to fix test --- tests/ServicesTest/PluginManagerTest.php | 26 ++++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/ServicesTest/PluginManagerTest.php b/tests/ServicesTest/PluginManagerTest.php index 65d75ec3..2606f91d 100644 --- a/tests/ServicesTest/PluginManagerTest.php +++ b/tests/ServicesTest/PluginManagerTest.php @@ -19,7 +19,7 @@ class PluginManagerTest extends TestCase return $manager; } - public function testPreventBootAgain() + public function testPreventBootingAgain() { // TODO: modify asserting 0 times here $this->mock(Filesystem::class, function ($mock) { @@ -29,18 +29,6 @@ class PluginManagerTest extends TestCase app('plugins')->boot(); } - public function testRegisterAutoload() - { - $dir = config('plugins.directory'); - config(['plugins.directory' => storage_path('mocks')]); - - $this->assertFalse(class_exists('Fake\Faker')); - $manager = $this->rebootPluginManager(app('plugins')); - $this->assertTrue(class_exists('Fake\Faker')); - - config(['plugins.directory' => $dir]); - } - public function testReportDuplicatedPlugins() { $this->mock(Filesystem::class, function ($mock) { @@ -82,4 +70,16 @@ class PluginManagerTest extends TestCase ])); $manager = $this->rebootPluginManager(app('plugins')); } + + public function testRegisterAutoload() + { + $dir = config('plugins.directory'); + config(['plugins.directory' => storage_path('mocks')]); + + $this->assertFalse(class_exists('Fake\Faker')); + $manager = $this->rebootPluginManager(app('plugins')); + $this->assertTrue(class_exists('Fake\Faker')); + + config(['plugins.directory' => $dir]); + } }