Commit 5debf88a authored by Nicolas Widart's avatar Nicolas Widart

Fixing tests

parent 49fac09f
...@@ -35,11 +35,10 @@ class ImagyTest extends MediaTestCase ...@@ -35,11 +35,10 @@ class ImagyTest extends MediaTestCase
{ {
parent::setUp(); parent::setUp();
$this->config = App::make('Illuminate\Contracts\Config\Repository'); $this->config = App::make('Illuminate\Contracts\Config\Repository');
$module = App::make('modules');
$this->finder = App::make('Illuminate\Filesystem\Filesystem'); $this->finder = App::make('Illuminate\Filesystem\Filesystem');
$this->imagy = new Imagy(new InterventionFactory(), app(ThumbnailManager::class), $this->config); $this->imagy = new Imagy(new InterventionFactory(), app(ThumbnailManager::class), $this->config);
$this->testbenchPublicPath = __DIR__ . '/../vendor/orchestra/testbench/fixture/public/'; $this->testbenchPublicPath = __DIR__ . '/../../../vendor/orchestra/testbench/fixture/public/';
$this->mediaPath = __DIR__ . '/Fixtures/'; $this->mediaPath = __DIR__ . '/Fixtures/';
$this->finder->copy("{$this->mediaPath}google-map.png", "{$this->testbenchPublicPath}google-map.png"); $this->finder->copy("{$this->mediaPath}google-map.png", "{$this->testbenchPublicPath}google-map.png");
} }
......
...@@ -50,9 +50,10 @@ class ModuleScaffoldTest extends BaseTestCase ...@@ -50,9 +50,10 @@ class ModuleScaffoldTest extends BaseTestCase
*/ */
private function cleanUp() private function cleanUp()
{ {
if (file_exists($this->testModulePath)) { if (file_exists(__DIR__ . '/../Modules/')) {
self::delTree($this->testModulePath); self::delTree(__DIR__ . '/../Modules/');
} }
mkdir(__DIR__ . '/../Modules/', 0777);
} }
/** /**
...@@ -94,7 +95,9 @@ class ModuleScaffoldTest extends BaseTestCase ...@@ -94,7 +95,9 @@ class ModuleScaffoldTest extends BaseTestCase
public function tearDown() public function tearDown()
{ {
$this->cleanUp(); if (file_exists(__DIR__ . '/../Modules/')) {
self::delTree(__DIR__ . '/../Modules/');
}
} }
/** @test */ /** @test */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment