/** * testCreateValidationError method * * @expectedException Att\M2X\Error\M2XException * @expectedExceptionMessage Validation Failed * * @return void */ public function testCreateValidationError() { $m2x = $this->generateMockM2X(); $m2x->request->method('request')->with($this->equalTo('POST'), $this->equalTo('https://api-m2x.att.com/v2/keys'))->willReturn(new Att\M2X\HttpResponse($this->_raw('keys_post_validation'))); $data = array('name' => 'Missing Permissions'); $key = Key::create($m2x, $data); }
/** * Create a new account key. * * @link https://m2x.att.com/developer/documentation/v2/keys#Create-Key * * @param $data * @return Key */ public function createKey($data) { return Key::create($this, $data); }