sampleData = array( (object) array( 'host' => 'localhost', 'problem' => '1', 'service' => 'ping', 'state' => '2', 'handled' => '1' ), (object) array( 'host' => 'localhost', 'problem' => '1', 'service' => 'www.icinga.org', 'state' => '0', 'handled' => '0' ), (object) array( 'host' => 'localhost', 'problem' => '1', 'service' => 'www.icinga.org', 'state' => '1', 'handled' => '0' ) ); } public function testSelectFactory() { $ds = new ArrayDatasource($this->sampleData); $query = $ds->select(); $this->assertInstanceOf('Icinga\\Data\\SimpleQuery', $query); } }