File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 88use Cycle \Database \Driver \DriverInterface ;
99use Cycle \Database \LoggerFactoryInterface ;
1010use Cycle \Database \NamedInterface ;
11+ use Illuminate \Log \Logger ;
1112use Illuminate \Log \LogManager ;
1213use Illuminate \Support \Facades \Event ;
1314use 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 }
You can’t perform that action at this time.
0 commit comments