parent
376dc8cd0f
commit
4206504c9c
|
@ -67,10 +67,11 @@ class ListControllerHostMySQLTest extends MonitoringControllerTest
|
||||||
}
|
}
|
||||||
$controller = $this->requireController('ListController', $backend);
|
$controller = $this->requireController('ListController', $backend);
|
||||||
$controller->hostsAction();
|
$controller->hostsAction();
|
||||||
$result = $controller->view->hosts->fetchAll();
|
$result = $controller->view->hosts;
|
||||||
|
|
||||||
$this->assertCount(5, $result, 'Testing correct result count for '.$backend);
|
$this->assertEquals(5, $result->getTotalItemCount(), 'Testing correct result count for '.$backend);
|
||||||
|
|
||||||
|
$result = $result->getAdapter()->getItems(0,6);
|
||||||
for($i=1;$i<=5;$i++) {
|
for($i=1;$i<=5;$i++) {
|
||||||
$this->assertEquals('host'.$i, $result[$i-1]->host_name, "Asserting correct host names for backend ".$backend);
|
$this->assertEquals('host'.$i, $result[$i-1]->host_name, "Asserting correct host names for backend ".$backend);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,9 +56,11 @@ class ListControllerServiceMySQLTest extends MonitoringControllerTest
|
||||||
|
|
||||||
$controller = $this->requireController('ListController', $backend);
|
$controller = $this->requireController('ListController', $backend);
|
||||||
$controller->servicesAction();
|
$controller->servicesAction();
|
||||||
$result = $controller->view->services->fetchAll();
|
|
||||||
|
|
||||||
$this->assertEquals(9, count($result), "Testing for correct service count");
|
$result = $controller->view->services;
|
||||||
|
|
||||||
|
$this->assertEquals(9, $result->getTotalItemCount(), "Testing for correct service count");
|
||||||
|
$result = $result->getAdapter()->getItems(0,1);
|
||||||
$this->assertEquals("notes.url", $result[0]->service_notes_url, "Testing for correct notes_url");
|
$this->assertEquals("notes.url", $result[0]->service_notes_url, "Testing for correct notes_url");
|
||||||
$this->assertEquals("action.url", $result[0]->service_action_url, "Testing for correct action_url");
|
$this->assertEquals("action.url", $result[0]->service_action_url, "Testing for correct action_url");
|
||||||
$this->assertEquals(0, $result[0]->service_state, "Testing for correct Service state");
|
$this->assertEquals(0, $result[0]->service_state, "Testing for correct Service state");
|
||||||
|
|
Loading…
Reference in New Issue