From 8b7e63d23702a3bb98efe51b8f54c5914066e082 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 11 Aug 2019 18:59:32 +0800 Subject: [PATCH] Fix test --- tests/ServicesTest/PluginManagerTest.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/ServicesTest/PluginManagerTest.php b/tests/ServicesTest/PluginManagerTest.php index 15bfbc83..65d75ec3 100644 --- a/tests/ServicesTest/PluginManagerTest.php +++ b/tests/ServicesTest/PluginManagerTest.php @@ -21,7 +21,6 @@ class PluginManagerTest extends TestCase public function testPreventBootAgain() { - $this->markTestSkipped('TODO'); // TODO: modify asserting 0 times here $this->mock(Filesystem::class, function ($mock) { $mock->shouldReceive('directories')->times(1); @@ -32,12 +31,14 @@ class PluginManagerTest extends TestCase 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' => env('PLUGINS_DIR')]); + config(['plugins.directory' => $dir]); } public function testReportDuplicatedPlugins()