/var/www/vhosts/nabawater/vendor/codeception/base/src/Codeception/Test
Edit: /var/www/vhosts/nabawater/vendor/codeception/base/src/Codeception/Test/Test.php (3851B)
testResult = $result;
$status = self::STATUS_PENDING;
$time = 0;
$e = null;
$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) {
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;
}
$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;
}
/**
* 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;
}
}