diff --git a/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLaravelTest.php b/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLaravelTest.php index d5ace058..5d5b7015 100644 --- a/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLaravelTest.php +++ b/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLaravelTest.php @@ -20,8 +20,12 @@ use Scoutapm\Logger\FilteredLogLevelDecorator; use function class_exists; +use function mkdir; use function sprintf; use function sys_get_temp_dir; +use function uniqid; + +use const DIRECTORY_SEPARATOR; /** @covers \Scoutapm\Laravel\Providers\ScoutApmServiceProvider */ final class ScoutApmServiceProviderUsingLaravelTest extends ScoutApmServiceProviderTestBase @@ -64,6 +68,10 @@ static function () use ($application): FilteredLogLevelDecorator { } ); + $storagePath = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('scoutapm-test-laravel-storage', true) . DIRECTORY_SEPARATOR; + mkdir($storagePath); + $application->useStoragePath($storagePath); + $application->singleton( HttpKernelInterface::class, function () use ($application): HttpKernelInterface { diff --git a/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLumenTest.php b/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLumenTest.php index 449e80e0..4b8c64fc 100644 --- a/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLumenTest.php +++ b/tests/Unit/Laravel/Providers/ScoutApmServiceProviderUsingLumenTest.php @@ -18,8 +18,13 @@ use Scoutapm\Logger\FilteredLogLevelDecorator; use function class_exists; +use function method_exists; +use function mkdir; use function sprintf; use function sys_get_temp_dir; +use function uniqid; + +use const DIRECTORY_SEPARATOR; /** @covers \Scoutapm\Laravel\Providers\ScoutApmServiceProvider */ final class ScoutApmServiceProviderUsingLumenTest extends ScoutApmServiceProviderTestBase @@ -80,6 +85,12 @@ static function () use ($application): FilteredLogLevelDecorator { } ); + if (method_exists($application, 'useStoragePath')) { + $storagePath = sys_get_temp_dir() . DIRECTORY_SEPARATOR . uniqid('scoutapm-test-lumen-storage', true) . DIRECTORY_SEPARATOR; + mkdir($storagePath); + $application->useStoragePath($storagePath); + } + $application->make('view'); $application->singleton( 'view',