/** * @expectedException InvalidArgumentException * @expectedExceptionMessage Public key with name "pubkey" already exists */ public function testAddPublicKeyThrowsIfAlreadyExists() { $this->setMockResponse($this->client, 'public_key_exists'); $this->client->addPublicKey('pubkey', 'newprivkey'); }