mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 08:17:22 +01:00
chore: different refactors
This commit is contained in:
@ -23,12 +23,15 @@ final class StateGenerator
|
||||
$state = new State();
|
||||
|
||||
foreach ($testResult->testErroredEvents() as $testResultEvent) {
|
||||
assert($testResultEvent instanceof Errored);
|
||||
$state->add(\NunoMaduro\Collision\Adapters\Phpunit\TestResult::fromTestCase(
|
||||
$testResultEvent->test(),
|
||||
TestResult::FAIL,
|
||||
$testResultEvent->throwable()
|
||||
));
|
||||
if ($testResultEvent instanceof Errored) {
|
||||
$state->add(TestResult::fromTestCase(
|
||||
$testResultEvent->test(),
|
||||
TestResult::FAIL,
|
||||
$testResultEvent->throwable()
|
||||
));
|
||||
} else {
|
||||
$state->add(TestResult::fromBeforeFirstTestMethodErrored($testResultEvent));
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($testResult->testFailedEvents() as $testResultEvent) {
|
||||
|
||||
Reference in New Issue
Block a user