Ejemplo n.º 1
0
 protected function runTest()
 {
     if (\PhpSpock\Adapter\PhpUnitAdapter::isSpecification($this)) {
         return \PhpSpock\Adapter\PhpUnitAdapter::runTest($this);
     } else {
         return parent::runTest();
     }
 }
 /**
  * {@inheritdoc}
  */
 public function runTest()
 {
     if ($this->getNumberOfRetries() < 1) {
         return parent::runTest();
     }
     foreach (range(1, $this->getNumberOfRetries()) as $try) {
         try {
             return parent::runTest();
         } catch (\Exception $e) {
             if (!$e instanceof ElasticsearchException) {
                 throw $e;
             }
             // If error was from elasticsearch re-setup tests and retry.
             if ($try !== $this->getNumberOfRetries()) {
                 $this->tearDown();
                 $this->setUp();
             }
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function runTest()
 {
     $this->initTestCoverage();
     return parent::runTest();
 }