protected function walkThroughTests($test) { if ($test instanceof PHPUnit_Framework_TestSuite) { $tests = $test->tests(); foreach ($tests as $testCase) { $this->walkThroughTests($testCase); } } else { if (WikiaTestSpeedAnnotator::isMarkedAsSlow($test->getAnnotations())) { $this->collectSlowTest($test); $this->displaySlowTest($test); } } }
protected function tearDown() { global $wgAnnotateTestSpeed; $this->unsetGlobals(); $this->unsetMessages(); if ($this->mockProxy === null) { throw new Exception("Current test did not execute setUp()"); } $this->mockProxy->disable(); $this->mockProxy = null; if (WikiaTestSpeedAnnotator::isMarkedAsSlow($this->getAnnotations())) { self::$numberSlowTests++; } if ($wgAnnotateTestSpeed) { WikiaTestSpeedAnnotator::add(get_class($this), $this->getName(false), microtime(true) - $this->startTime, $this->getAnnotations()); } }