Fix statusdat component test

refs #4639
This commit is contained in:
Johannes Meyer 2014-04-10 10:42:50 +02:00
parent ccae70bc80
commit d78aec2d48

View File

@ -24,7 +24,7 @@ class StatusdatComponentTest extends BaseTestCase
public function testServicegroupFilterFromService() { public function testServicegroupFilterFromService() {
$r = $this->getReader(); $r = $this->getReader();
$group = array(array('a1','b2')); $group = array('a1','b2');
$result = $r->select()->from("services")->where("group IN ?",$group)->getResult(); $result = $r->select()->from("services")->where("group IN ?",$group)->getResult();
$this->assertCount(9, $result, 'Assert items to be returned in a servicegroup filter'); $this->assertCount(9, $result, 'Assert items to be returned in a servicegroup filter');
@ -35,7 +35,7 @@ class StatusdatComponentTest extends BaseTestCase
public function testServicegroupFilterFromHost() { public function testServicegroupFilterFromHost() {
$r = $this->getReader(); $r = $this->getReader();
$group = array(array('a1','b2')); $group = array('a1','b2');
$result = $r->select()->from("hosts")->where("services.group IN ?",$group)->getResult(); $result = $r->select()->from("hosts")->where("services.group IN ?",$group)->getResult();
$this->assertCount(3, $result); $this->assertCount(3, $result);
foreach($result as $obj) { foreach($result as $obj) {
@ -45,7 +45,7 @@ class StatusdatComponentTest extends BaseTestCase
public function testHostgroupFilterFromHost() { public function testHostgroupFilterFromHost() {
$r = $this->getReader(); $r = $this->getReader();
$group = array(array('exc-hostb')); $group = array('exc-hostb');
$result = $r->select()->from("hosts")->where("group IN ?",$group)->getResult(); $result = $r->select()->from("hosts")->where("group IN ?",$group)->getResult();
$this->assertCount(3, $result); $this->assertCount(3, $result);
foreach($result as $obj) { foreach($result as $obj) {
@ -55,7 +55,7 @@ class StatusdatComponentTest extends BaseTestCase
public function testHostgroupFilterFromService() { public function testHostgroupFilterFromService() {
$r = $this->getReader(); $r = $this->getReader();
$group = array(array('exc-hostb')); $group = array('exc-hostb');
$result = $r->select()->from("services")->where("host.group IN ?", $group)->getResult(); $result = $r->select()->from("services")->where("host.group IN ?", $group)->getResult();
$this->assertCount(9, $result); $this->assertCount(9, $result);