コード例 #1
0
 /**
  * test search of snom phone
  *
  */
 public function testSearchSnomPhone()
 {
     $testPhone = $this->getSnomPhone();
     $lineData = array();
     $rightsData = array();
     $returned = $this->_json->saveSnomPhone($testPhone, $lineData, $rightsData);
     $phoneTemplate = $this->_json->getSnomTemplate($testPhone['template_id']);
     $phoneLocation = $this->_json->getSnomLocation($testPhone['location_id']);
     $searchResult = $this->_json->searchSnomPhones($this->getSnomPhoneFilter($testPhone['description']), $this->_getPaging());
     $this->assertEquals(1, $searchResult['totalcount']);
     $this->assertEquals($phoneTemplate['name'], $searchResult['results'][0]['template']);
     $this->assertEquals($phoneLocation['name'], $searchResult['results'][0]['location']);
 }