_name = 'dummy-name'; $this->_time = 14; $this->_timings = array('class1' => 1, 'class2' => 3); $this->_result = new Solarium_Result_Select_Debug_TimingPhase($this->_name, $this->_time, $this->_timings); } public function testGetTime() { $this->assertEquals( $this->_time, $this->_result->getTime() ); } public function testGetTiming() { $this->assertEquals( $this->_timings['class1'], $this->_result->getTiming('class1') ); } public function testGetPhaseWithInvalidKey() { $this->assertEquals( null, $this->_result->getTiming('invalidkey') ); } public function testGetTimings() { $this->assertEquals( $this->_timings, $this->_result->getTimings() ); } public function testIterator() { $items = array(); foreach($this->_result AS $key => $item) { $items[$key] = $item; } $this->assertEquals($this->_timings, $items); } public function testCount() { $this->assertEquals(count($this->_timings), count($this->_result)); } }