From 197b61b9d6a5b8351e92c9b0c6d683e7465771b8 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Mon, 12 Aug 2019 09:56:51 +0800 Subject: [PATCH] Fix test --- .env.testing | 4 ++-- tests/ServicesTest/PluginManagerTest.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.testing b/.env.testing index 037189e5..ea621d5b 100644 --- a/.env.testing +++ b/.env.testing @@ -11,7 +11,7 @@ DB_HOST = 127.0.0.1 DB_PORT = 3306 DB_DATABASE = test DB_USERNAME = root -DB_PASSWORD = null +DB_PASSWORD = root DB_PREFIX = null PWD_METHOD = BCRYPT @@ -34,7 +34,7 @@ REDIS_HOST = 127.0.0.1 REDIS_PASSWORD = null REDIS_PORT = 6379 -PLUGINS_DIR = plugins +PLUGINS_DIR = null PLUGINS_URL = null JWT_SECRET = 1tdM3gXarxYI4KlAHMBo238iC2tEb4I3EtBlZTQQXvInXIt7V2ix7hJ1KTvxCKZW diff --git a/tests/ServicesTest/PluginManagerTest.php b/tests/ServicesTest/PluginManagerTest.php index 2606f91d..a95ef7bd 100644 --- a/tests/ServicesTest/PluginManagerTest.php +++ b/tests/ServicesTest/PluginManagerTest.php @@ -33,17 +33,17 @@ class PluginManagerTest extends TestCase { $this->mock(Filesystem::class, function ($mock) { $mock->shouldReceive('directories') - ->with(config('plugins.directory')) + ->with(base_path('plugins')) ->once() ->andReturn(collect(['/nano', '/yuko'])); $mock->shouldReceive('exists') - ->with('/nano/package.json') + ->with('/nano'.DIRECTORY_SEPARATOR.'package.json') ->once() ->andReturn(true); $mock->shouldReceive('get') - ->with('/nano/package.json') + ->with('/nano'.DIRECTORY_SEPARATOR.'package.json') ->once() ->andReturn(json_encode([ 'name' => 'fake', @@ -51,12 +51,12 @@ class PluginManagerTest extends TestCase ])); $mock->shouldReceive('exists') - ->with('/yuko/package.json') + ->with('/yuko'.DIRECTORY_SEPARATOR.'package.json') ->once() ->andReturn(true); $mock->shouldReceive('get') - ->with('/yuko/package.json') + ->with('/yuko'.DIRECTORY_SEPARATOR.'package.json') ->once() ->andReturn(json_encode([ 'name' => 'fake',