Fix cleaning up

This commit is contained in:
Pig Fang 2019-03-14 00:13:32 +08:00
parent d45d287d93
commit acacd09253
3 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ class MarketControllerTest extends TestCase
]);
$this->assertTrue(is_dir(config('plugins.directory').DIRECTORY_SEPARATOR.'fake-test-download'));
$this->assertTrue(
empty(glob(config('plugins.directory').DIRECTORY_SEPARATOR.'plugins/fake-test-download_*.zip'))
empty(glob(config('plugins.directory').DIRECTORY_SEPARATOR.'fake-test-download_*.zip'))
);
// Broken archive
@ -170,7 +170,7 @@ class MarketControllerTest extends TestCase
],
]);
File::deleteDirectory(base_path('plugins/'.$package['name']));
File::deleteDirectory(config('plugins.directory').DIRECTORY_SEPARATOR.$package['name']);
}
protected function tearDown(): void

View File

@ -143,7 +143,7 @@ class PluginControllerTest extends TestCase
{
// Clean fake plugins
File::deleteDirectory(config('plugins.directory').DIRECTORY_SEPARATOR.'fake-plugin-for-test');
File::deleteDirectory(config('plugins.directory').DIRECTORY_SEPARATOR.'plugins/fake-plugin-with-config-view');
File::deleteDirectory(config('plugins.directory').DIRECTORY_SEPARATOR.'fake-plugin-with-config-view');
parent::tearDown();
}

View File

@ -45,7 +45,7 @@ class HookTest extends TestCase
$this->get('/')
->assertSee('fake-plugin-with-i18n/lang/en/locale.js');
File::deleteDirectory(config('plugins.directory').DIRECTORY_SEPARATOR.'plugins/fake-plugin-with-i18n');
File::deleteDirectory(config('plugins.directory').DIRECTORY_SEPARATOR.'fake-plugin-with-i18n');
}
public function testAddStyleFileToPage()