22namespace SplitIO \Test \Suite \Sdk ;
33
44use \stdClass ;
5+ use Monolog \Logger ;
6+ use Monolog \Handler \ErrorLogHandler ;
57use SplitIO \Component \Common \Di ;
68use SplitIO \Test \Suite \Redis \ReflectiveTools ;
79use SplitIO \Component \Cache \ImpressionCache ;
@@ -423,16 +425,16 @@ public function testClient()
423425 */
424426 public function testCustomLog ()
425427 {
426- /*
427428 Di::set (Di::KEY_FACTORY_TRACKER , false );
428429 // create a log channel
429430 $ log = new Logger ('SplitIO ' );
431+ $ log ->pushHandler (new ErrorLogHandler (ErrorLogHandler::OPERATING_SYSTEM , Logger::INFO ));
430432
431433 $ parameters = array ('scheme ' => 'redis ' , 'host ' => REDIS_HOST , 'port ' => REDIS_PORT , 'timeout ' => 881 );
432434 $ options = array ('prefix ' => TEST_PREFIX );
433435
434436 $ sdkConfig = array (
435- 'log' => array('psr3-instance' => $log),
437+ 'log ' => array ('psr3-instance ' => $ log, ' standard ' => ' psr3-v3 ' ),
436438 'cache ' => array ('adapter ' => 'predis ' , 'parameters ' => $ parameters , 'options ' => $ options )
437439 );
438440
@@ -451,7 +453,6 @@ public function testCustomLog()
451453
452454 $ this ->assertTrue ($ splitSdk ->isTreatment ('user1 ' , 'sample_feature ' , 'on ' ));
453455 $ this ->assertFalse ($ splitSdk ->isTreatment ('user1 ' , 'sample_feature ' , 'invalid_treatment ' ));
454- */
455456 }
456457
457458 public function testInvalidCacheAdapter ()
0 commit comments