芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/xmintal-back/vendor/codeception/codeception/src/Codeception/Test/Test.php
testResult = $result; $status = self::STATUS_PENDING; $time = 0; $e = null; $timer = null; if (class_exists(Duration::class)) { $timer = new Timer(); } $result->startTest($this); foreach ($this->hooks as $hook) { if (method_exists($this, $hook.'Start')) { $this->{$hook.'Start'}(); } } $failedToStart = ReflectionHelper::readPrivateProperty($result, 'lastTestFailed'); if (!$this->ignored && !$failedToStart) { if (null !== $timer) { $timer->start(); } else { Timer::start(); } try { $this->test(); $status = self::STATUS_OK; } catch (\PHPUnit\Framework\AssertionFailedError $e) { $status = self::STATUS_FAIL; } catch (\PHPUnit\Framework\Exception $e) { $status = self::STATUS_ERROR; } catch (\Throwable $e) { $e = new \PHPUnit\Framework\ExceptionWrapper($e); $status = self::STATUS_ERROR; } catch (\Exception $e) { $e = new \PHPUnit\Framework\ExceptionWrapper($e); $status = self::STATUS_ERROR; } if (null !== $timer) { $time = $timer->stop()->asSeconds(); } else { $time = Timer::stop(); } } foreach (array_reverse($this->hooks) as $hook) { if (method_exists($this, $hook.'End')) { $this->{$hook.'End'}($status, $time, $e); } } $result->endTest($this, $time); return $result; } public function getTestResultObject() { return $this->testResult; } #[\ReturnTypeWillChange] /** * This class represents exactly one test * @return int */ public function count() { return 1; } /** * Should a test be skipped (can be set from hooks) * * @param boolean $ignored */ protected function ignore($ignored) { $this->ignored = $ignored; } }