mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
chore: uses phpunit v11.5.33
This commit is contained in:
@ -24,11 +24,11 @@
|
|||||||
"pestphp/pest-plugin": "^3.0.0",
|
"pestphp/pest-plugin": "^3.0.0",
|
||||||
"pestphp/pest-plugin-arch": "^3.1.1",
|
"pestphp/pest-plugin-arch": "^3.1.1",
|
||||||
"pestphp/pest-plugin-mutate": "^3.0.5",
|
"pestphp/pest-plugin-mutate": "^3.0.5",
|
||||||
"phpunit/phpunit": "^11.5.15"
|
"phpunit/phpunit": "^11.5.33"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"filp/whoops": "<2.16.0",
|
"filp/whoops": "<2.16.0",
|
||||||
"phpunit/phpunit": ">11.5.15",
|
"phpunit/phpunit": ">11.5.33",
|
||||||
"sebastian/exporter": "<6.0.0",
|
"sebastian/exporter": "<6.0.0",
|
||||||
"webmozart/assert": "<1.11.0"
|
"webmozart/assert": "<1.11.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -49,7 +49,7 @@ use const DIRECTORY_SEPARATOR;
|
|||||||
use const LOCK_EX;
|
use const LOCK_EX;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestStatus\TestStatus;
|
use PHPUnit\Framework\TestStatus\TestStatus;
|
||||||
use PHPUnit\Runner\DirectoryCannotBeCreatedException;
|
use PHPUnit\Runner\DirectoryDoesNotExistException;
|
||||||
use PHPUnit\Runner\Exception;
|
use PHPUnit\Runner\Exception;
|
||||||
use PHPUnit\Util\Filesystem;
|
use PHPUnit\Util\Filesystem;
|
||||||
|
|
||||||
@ -98,28 +98,28 @@ final class DefaultResultCache implements ResultCache
|
|||||||
$this->cacheFilename = $filepath ?? $_ENV['PHPUNIT_RESULT_CACHE'] ?? self::DEFAULT_RESULT_CACHE_FILENAME;
|
$this->cacheFilename = $filepath ?? $_ENV['PHPUNIT_RESULT_CACHE'] ?? self::DEFAULT_RESULT_CACHE_FILENAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setStatus(string $id, TestStatus $status): void
|
public function setStatus(ResultCacheId $id, TestStatus $status): void
|
||||||
{
|
{
|
||||||
if ($status->isSuccess()) {
|
if ($status->isSuccess()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->defects[$id] = $status;
|
$this->defects[$id->asString()] = $status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function status(string $id): TestStatus
|
public function status(ResultCacheId $id): TestStatus
|
||||||
{
|
{
|
||||||
return $this->defects[$id] ?? TestStatus::unknown();
|
return $this->defects[$id->asString()] ?? TestStatus::unknown();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setTime(string $id, float $time): void
|
public function setTime(ResultCacheId $id, float $time): void
|
||||||
{
|
{
|
||||||
$this->times[$id] = $time;
|
$this->times[$id->asString()] = $time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function time(string $id): float
|
public function time(ResultCacheId $id): float
|
||||||
{
|
{
|
||||||
return $this->times[$id] ?? 0.0;
|
return $this->times[$id->asString()] ?? 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mergeWith(self $other): void
|
public function mergeWith(self $other): void
|
||||||
@ -179,7 +179,7 @@ final class DefaultResultCache implements ResultCache
|
|||||||
public function persist(): void
|
public function persist(): void
|
||||||
{
|
{
|
||||||
if (! Filesystem::createDirectory(dirname($this->cacheFilename))) {
|
if (! Filesystem::createDirectory(dirname($this->cacheFilename))) {
|
||||||
throw new DirectoryCannotBeCreatedException($this->cacheFilename);
|
throw new DirectoryDoesNotExistException(dirname($this->cacheFilename));
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
|||||||
@ -40,7 +40,7 @@ final class Result
|
|||||||
*/
|
*/
|
||||||
public static function exitCode(Configuration $configuration, TestResult $result): int
|
public static function exitCode(Configuration $configuration, TestResult $result): int
|
||||||
{
|
{
|
||||||
if ($result->wasSuccessfulIgnoringPhpunitWarnings()) {
|
if ($result->wasSuccessful()) {
|
||||||
if ($configuration->failOnWarning()) {
|
if ($configuration->failOnWarning()) {
|
||||||
$warnings = $result->numberOfTestsWithTestTriggeredPhpunitWarningEvents()
|
$warnings = $result->numberOfTestsWithTestTriggeredPhpunitWarningEvents()
|
||||||
+ count($result->warnings())
|
+ count($result->warnings())
|
||||||
@ -60,7 +60,7 @@ final class Result
|
|||||||
return self::FAILURE_EXIT;
|
return self::FAILURE_EXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result->wasSuccessfulIgnoringPhpunitWarnings()) {
|
if ($result->wasSuccessful()) {
|
||||||
if ($configuration->failOnRisky() && $result->hasTestConsideredRiskyEvents()) {
|
if ($configuration->failOnRisky() && $result->hasTestConsideredRiskyEvents()) {
|
||||||
$returnCode = self::FAILURE_EXIT;
|
$returnCode = self::FAILURE_EXIT;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user