_time = 14; $this->_phases = array('key1' => 'dummy1', 'key2' => 'dummy2'); $this->_result = new Solarium_Result_Select_Debug_Timing($this->_time, $this->_phases); } public function testGetTime() { $this->assertEquals( $this->_time, $this->_result->getTime() ); } public function testGetPhase() { $this->assertEquals( $this->_phases['key1'], $this->_result->getPhase('key1') ); } public function testGetPhaseWithInvalidKey() { $this->assertEquals( null, $this->_result->getPhase('invalidkey') ); } public function testGetPhases() { $this->assertEquals( $this->_phases, $this->_result->getPhases() ); } public function testIterator() { $items = array(); foreach($this->_result AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_phases, $items); } public function testCount() { $this->assertEquals(count($this->_phases), count($this->_result)); } }