Esempio n. 1
0
 public function testLoginFailedException()
 {
     $this->expectException(LoginException::class);
     $apiClient = new Client(new httpClient());
     $apiClient->setConfig(['api_key' => '<non existing key>', 'api_secret' => '<non existing secret>']);
     $apiClient->call();
 }
Esempio n. 2
0
 private function getHeader($name, $version)
 {
     $file = "<?php\n";
     $file .= "/**\n";
     $file .= " * Open Domain Regestry API Client\n";
     $file .= " *\n";
     $file .= " * @category   API Client\n";
     $file .= " * @package    LauLamanApps\\OdrBundle\n";
     $file .= " * @author     Laurens Laman <*****@*****.**>\n";
     $file .= " * @license    BSD http://choosealicense.com/licenses/#bsd-3\n";
     $file .= " * @version    {$this->apiClient->getVersion()}\n";
     $file .= " * @link       LauLaman.com\n";
     $file .= "*/\n";
     $file .= "namespace LauLamanApps\\OdrBundle\\Model\\Domain\\Tld;\n";
     $file .= "\n";
     $file .= "use LauLamanApps\\OdrBundle\\Model\\Domain\\Base;\n";
     $file .= "use Symfony\\Component\\Validator\\Constraints as Assert;\n";
     $file .= "\n";
     $file .= "class {$name} extends Base\n";
     $file .= "{\n";
     return $file;
 }