diff --git a/src/SqlLogger.php b/src/SqlLogger.php index 2e7f0db..fdc2a38 100644 --- a/src/SqlLogger.php +++ b/src/SqlLogger.php @@ -5,7 +5,7 @@ use Illuminate\Support\Collection; use Illuminate\Support\Facades\DB; -readonly class SqlLogger +class SqlLogger { /** * SqlLogger constructor. diff --git a/tests/Unit/LogSqlQueryTest.php b/tests/Unit/LogSqlQueryTest.php index 8013842..03076a6 100644 --- a/tests/Unit/LogSqlQueryTest.php +++ b/tests/Unit/LogSqlQueryTest.php @@ -2,6 +2,7 @@ use Illuminate\Console\Events\CommandFinished; use Illuminate\Foundation\Http\Events\RequestHandled; +use Illuminate\Support\Facades\App; use Onlime\LaravelSqlReporter\Listeners\LogSqlQuery; use Onlime\LaravelSqlReporter\SqlLogger; @@ -17,6 +18,8 @@ }); it('can handle the request handled event', function () { + App::shouldReceive('runningInConsole')->andReturn(false); + $listener = new LogSqlQuery($this->logger); $listener->handle(Mockery::mock(RequestHandled::class));