Ejemplo n.º 1
0
 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());
     }
 }
 public static function initialize()
 {
     self::$methods = [];
 }
Ejemplo n.º 3
0
 protected function displaySlowTest($test)
 {
     print get_class($test) . '::' . $test->getName() . ' - ' . WikiaTestSpeedAnnotator::getSlowExecutionTime($test->getAnnotations()) . 's' . PHP_EOL;
 }