public function testLogging() { Constants::$LOGGING = true; Constants::$LOG_FILE_PATH = '/dev/null'; $result = $this->client->execute('dbOpen', ['database' => 'GratefulDeadConcerts']); $this->assertNotEquals(-1, $result['sessionId']); $this->assertNotEmpty(count($result)); }
/** * @param string $type * * @return mixed the test server config */ protected static function getConfig($type = '') { $config = json_decode(file_get_contents(__DIR__ . '/../../test-server.json'), true); switch ($type) { case 'connect': case 'open': $config['username'] = $config[$type]['username']; $config['password'] = $config[$type]['password']; break; default: $config['username'] = $config['open']['username']; $config['password'] = $config['open']['password']; } ClientConstants::$LOGGING = $config['logging']; ClientConstants::$LOG_FILE_PATH = $config['log_file_path']; return $config; }