dirname(__FILE__)."/status.dat", "objects_file" => dirname(__FILE__)."/objects.cache" )),null,true); return $reader; } public function testServicegroupFilterFromService() { $r = $this->getReader(); $group = array(array('a1','b2')); $result = $r->select()->from("services")->where("group IN ?",$group)->getResult(); $this->assertCount(2,$result); foreach($result as $obj) { $this->assertTrue(is_object($obj)); } } public function testServicegroupFilterFromHost() { $r = $this->getReader(); $group = array(array('a1','b2')); $result = $r->select()->from("hosts")->where("services.group IN ?",$group)->getResult(); $this->assertCount(2,$result); foreach($result as $obj) { $this->assertTrue(is_object($obj)); } } public function testHostgroupFilterFromHost() { $r = $this->getReader(); $group = array(array('exc-hostb')); $result = $r->select()->from("hosts")->where("group IN ?",$group)->getResult(); $this->assertCount(2,$result); foreach($result as $obj) { $this->assertTrue(is_object($obj)); } } public function testHostgroupFilterFromService() { $r = $this->getReader(); $group = array(array('exc-hostb')); $result = $r->select()->from("services")->where("host.group IN ?",$group)->getResult(); $this->assertCount(6,$result); foreach($result as $obj) { $this->assertTrue(is_object($obj)); } } }