Beispiel #1
0
 public function testGetListBySearch()
 {
     $testResult = array(array('host_name' => 'Host 1'), array('host_name' => 'Host 2'));
     $result = Host::getListBySearch('host_name');
     $this->assertEquals($testResult, $result);
     $testResult = array(array('host_name' => 'Host 1'));
     $result = Host::getListBySearch('host_name', -1, 0, null, 'ASC', array('host_comment' => 'First'));
     $this->assertEquals($testResult, $result);
     $testResult = array(array('host_name' => 'Host 1'), array('host_name' => 'Host 2'));
     $result = Host::getListBySearch('host_name', -1, 0, 'host_name', 'ASC', array('host_comment' => array('First', 'Second')));
     $this->assertEquals($testResult, $result);
 }