fix: --retry not running all tests after passing

This commit is contained in:
Nuno Maduro
2022-12-29 09:34:53 +00:00
parent 0fd5b2efe1
commit c9a02b964d
2 changed files with 11 additions and 1 deletions

View File

@ -123,7 +123,9 @@ final class TestCaseMethodFactory
$methodName = Str::evaluable($this->description);
if (Retry::$retrying && ! TestSuite::getInstance()->retryTempRepository->exists(sprintf('%s::%s', $classFQN, $methodName))) {
$retryRepository = TestSuite::getInstance()->retryTempRepository;
if (Retry::$retrying && ! $retryRepository->isEmpty() && ! $retryRepository->exists(sprintf('%s::%s', $classFQN, $methodName))) {
return '';
}

View File

@ -37,6 +37,14 @@ final class TempRepository
$this->save([]);
}
/**
* Checks if there is any element.
*/
public function isEmpty(): bool
{
return $this->all() === [];
}
/**
* Checks if the given element exists.
*/