Skip to content

Commit cec6909

Browse files
authored
Merge pull request #649 from wayofdev/feat/laravel-telescope
2 parents 398fab7 + b84a52d commit cec6909

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/src/Bridge/Laravel/LoggerFactoryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Cycle\Database\Driver\DriverInterface;
99
use Cycle\Database\LoggerFactoryInterface;
1010
use Cycle\Database\NamedInterface;
11+
use Illuminate\Log\Logger;
1112
use Illuminate\Log\LogManager;
1213
use Illuminate\Support\Facades\Event;
1314
use Mockery as m;
@@ -37,6 +38,8 @@ protected function tearDown(): void
3738
*/
3839
public function it_should_return_custom_logger_from_factory(): void
3940
{
41+
$this->app['config']->set('cycle.database.logger.use_telescope', false);
42+
4043
$mockDriver = m::mock(DriverInterface::class, NamedInterface::class);
4144
$mockDriver->shouldReceive('getName')->andReturn('custom');
4245

@@ -49,6 +52,8 @@ public function it_should_return_custom_logger_from_factory(): void
4952
$logger = $loggerFactory->getLogger($mockDriver);
5053
$logger->info('Test log entry');
5154

55+
$this::assertInstanceOf(Logger::class, $logger);
56+
5257
$logContent = file_get_contents(storage_path('logs/logger-factory-test.log'));
5358
$this::assertStringContainsString('Test log entry', $logContent);
5459
}

0 commit comments

Comments
 (0)