public function testSetGetPrivateKey() { $this->assertEquals("private", $this->config->setPrivateKey("private")->getPrivateKey()); }
/** * @param $appKey * @param $secretKey * @param $privateKey * @param Config $config * @return Config */ private static function getUpdatedConfig($appKey, $secretKey, $privateKey, $config) { if ($appKey instanceof Config) { $config = $appKey; } elseif ($secretKey instanceof Config) { $config = $secretKey; $config->setAppKey($appKey); } elseif ($privateKey instanceof Config) { $config = $privateKey; $config->setSecretKey($secretKey); $config->setAppKey($appKey); } else { if (is_null($config)) { $config = new Config(); } $config->setAppKey($appKey); $config->setSecretKey($secretKey); $config->setPrivateKey($privateKey); } return $config; }