diff --git a/composer.json b/composer.json index d7cd598f..2d9d0ed3 100644 --- a/composer.json +++ b/composer.json @@ -63,6 +63,9 @@ }, "files": [ "tests/helpers.php" + ], + "classmap": [ + "tests" ] }, "suggest": { diff --git a/tests/Feature/Configuration/Cache/FileCacheProviderTest.php b/tests/Feature/Configuration/Cache/FileCacheProviderTest.php index 4e780c8d..32adb5a4 100644 --- a/tests/Feature/Configuration/Cache/FileCacheProviderTest.php +++ b/tests/Feature/Configuration/Cache/FileCacheProviderTest.php @@ -8,17 +8,17 @@ class FileCacheProviderTest extends AbstractCacheProviderTest { public function getProvider() - { + { $config = m::mock(Repository::class); $config->shouldReceive('get') - ->with('cache.stores.file.path', __DIR__ . DIRECTORY_SEPARATOR . '../../Stubs/storage/framework/cache') + ->with('cache.stores.file.path', 'framework/cache') ->once() ->andReturn('/tmp'); $config->shouldReceive('get') ->with('doctrine.cache.namespace', 'doctrine-cache') ->once() - ->andReturn('doctrine-cache'); + ->andReturn('doctrine-cache'); return new FileCacheProvider( $config, @@ -31,11 +31,3 @@ public function getExpectedInstance() } } -if(!function_exists('storage_path')) { - function storage_path($path = null) - { - $storage = __DIR__ . DIRECTORY_SEPARATOR . '../../Stubs/storage'; - - return is_null($path) ? $storage : $storage . DIRECTORY_SEPARATOR . $path; - } -} diff --git a/tests/Feature/Configuration/Cache/PhpFileCacheProviderTest.php b/tests/Feature/Configuration/Cache/PhpFileCacheProviderTest.php index 78f48f03..27b7f12a 100644 --- a/tests/Feature/Configuration/Cache/PhpFileCacheProviderTest.php +++ b/tests/Feature/Configuration/Cache/PhpFileCacheProviderTest.php @@ -8,17 +8,17 @@ class PhpFileCacheProviderTest extends AbstractCacheProviderTest { public function getProvider() - { + { $config = m::mock(Repository::class); $config->shouldReceive('get') - ->with('cache.stores.file.path', __DIR__ . DIRECTORY_SEPARATOR . '../../Stubs/storage/framework/cache') + ->with('cache.stores.file.path', 'framework/cache') ->once() ->andReturn('/tmp'); $config->shouldReceive('get') ->with('doctrine.cache.namespace', 'doctrine-cache') ->once() - ->andReturn('doctrine-cache'); + ->andReturn('doctrine-cache'); return new PhpFileCacheProvider( $config,