Example #1
0
 /**
  * testRemoveDevice method
  *
  * @return void
  */
 public function testRemoveDevice()
 {
     $m2x = $this->generateMockM2X();
     $m2x->request->expects($this->once())->method('request')->with($this->equalTo('DELETE'), $this->equalTo('https://api-m2x.att.com/v2/collections/d447a2c499bc009d96a7d693a2e5b909/devices/12f74d5878561bf1c19ea8942515c466'), $this->equalTo(array()))->willReturn(new Att\M2X\HttpResponse($this->_raw('collections_remove_device_success')));
     $collection = new Collection($m2x, array('id' => 'd447a2c499bc009d96a7d693a2e5b909'));
     $result = $collection->removeDevice('12f74d5878561bf1c19ea8942515c466');
     $this->assertInstanceOf('Att\\M2X\\HttpResponse', $result);
 }
Example #2
0
 /**
  * Create a new collection.
  *
  * @link https://m2x.att.com/developer/documentation/v2/collections#Create-Collection
  *
  * @param array $data
  * @return Device
  */
 public function createCollection($data)
 {
     return Collection::create($this, $data);
 }