phalApiLoggerExplorer = new PhalApi_Logger_Explorer( PhalApi_Logger::LOG_LEVEL_DEBUG | PhalApi_Logger::LOG_LEVEL_INFO | PhalApi_Logger::LOG_LEVEL_ERROR); } protected function tearDown() { } /** * @group testLog */ public function testLog() { $type = 'test'; $msg = 'this is a test msg'; $data = array('from' => 'testLog'); $this->phalApiLoggerExplorer->log($type, $msg, $data); $this->expectOutputRegex('/TEST|this is a test msg|{"from":"testLog"}/'); } public function testLogButNoShow() { $logger = new PhalApi_Logger_Explorer(0); $logger->info('no info'); $logger->debug('no debug'); $logger->error('no error'); $this->expectOutputString(''); } }