diff --git a/phpunit.xsd b/phpunit.xsd index 0e608a23306..dfe86519e53 100644 --- a/phpunit.xsd +++ b/phpunit.xsd @@ -172,18 +172,22 @@ + + + + + + + + - + - - - - - + diff --git a/src/Framework/TestSuite.php b/src/Framework/TestSuite.php index 7bd49513fc7..c1fe56a91b4 100644 --- a/src/Framework/TestSuite.php +++ b/src/Framework/TestSuite.php @@ -69,13 +69,15 @@ class TestSuite implements IteratorAggregate, Reorderable, SelfDescribing, Test private array $tests = []; private ?array $providedTests = null; private ?Factory $iteratorFilter = null; + private readonly bool $stopOnDefect; + private readonly bool $stopOnDeprecation; private readonly bool $stopOnError; private readonly bool $stopOnFailure; - private readonly bool $stopOnWarning; - private readonly bool $stopOnRisky; private readonly bool $stopOnIncomplete; + private readonly bool $stopOnNotice; + private readonly bool $stopOnRisky; private readonly bool $stopOnSkipped; - private readonly bool $stopOnDefect; + private readonly bool $stopOnWarning; public static function empty(string $name = null): static { @@ -149,13 +151,15 @@ final private function __construct(string $name) $configuration = Registry::get(); - $this->stopOnError = $configuration->stopOnError(); - $this->stopOnFailure = $configuration->stopOnFailure(); - $this->stopOnWarning = $configuration->stopOnWarning(); - $this->stopOnRisky = $configuration->stopOnRisky(); - $this->stopOnIncomplete = $configuration->stopOnIncomplete(); - $this->stopOnSkipped = $configuration->stopOnSkipped(); - $this->stopOnDefect = $configuration->stopOnDefect(); + $this->stopOnDeprecation = $configuration->stopOnDeprecation(); + $this->stopOnDefect = $configuration->stopOnDefect(); + $this->stopOnError = $configuration->stopOnError(); + $this->stopOnFailure = $configuration->stopOnFailure(); + $this->stopOnIncomplete = $configuration->stopOnIncomplete(); + $this->stopOnNotice = $configuration->stopOnNotice(); + $this->stopOnRisky = $configuration->stopOnRisky(); + $this->stopOnSkipped = $configuration->stopOnSkipped(); + $this->stopOnWarning = $configuration->stopOnWarning(); } /** diff --git a/src/TextUI/Configuration/Cli/Builder.php b/src/TextUI/Configuration/Cli/Builder.php index f1cd27ec96b..94dc6ffcea3 100644 --- a/src/TextUI/Configuration/Cli/Builder.php +++ b/src/TextUI/Configuration/Cli/Builder.php @@ -87,18 +87,22 @@ final class Builder 'reverse-list', 'static-backup', 'stderr', + 'fail-on-deprecation', + 'fail-on-empty-test-suite', + 'fail-on-incomplete', + 'fail-on-notice', + 'fail-on-risky', + 'fail-on-skipped', + 'fail-on-warning', 'stop-on-defect', + 'stop-on-deprecation', 'stop-on-error', 'stop-on-failure', - 'stop-on-warning', 'stop-on-incomplete', + 'stop-on-notice', 'stop-on-risky', 'stop-on-skipped', - 'fail-on-empty-test-suite', - 'fail-on-incomplete', - 'fail-on-risky', - 'fail-on-skipped', - 'fail-on-warning', + 'stop-on-warning', 'strict-coverage', 'disable-coverage-ignore', 'strict-global-state', @@ -173,11 +177,22 @@ public function fromParameters(array $parameters): Configuration $excludeGroups = null; $executionOrder = null; $executionOrderDefects = null; + $failOnDeprecation = null; $failOnEmptyTestSuite = null; $failOnIncomplete = null; + $failOnNotice = null; $failOnRisky = null; $failOnSkipped = null; $failOnWarning = null; + $stopOnDefect = null; + $stopOnDeprecation = null; + $stopOnError = null; + $stopOnFailure = null; + $stopOnIncomplete = null; + $stopOnNotice = null; + $stopOnRisky = null; + $stopOnSkipped = null; + $stopOnWarning = null; $filter = null; $generateConfiguration = false; $migrateConfiguration = false; @@ -205,13 +220,6 @@ public function fromParameters(array $parameters): Configuration $reverseList = null; $stderr = null; $strictCoverage = null; - $stopOnDefect = null; - $stopOnError = null; - $stopOnFailure = null; - $stopOnIncomplete = null; - $stopOnRisky = null; - $stopOnSkipped = null; - $stopOnWarning = null; $teamcityLogfile = null; $testdoxHtmlFile = null; $testdoxTextFile = null; @@ -503,63 +511,83 @@ public function fromParameters(array $parameters): Configuration break; - case '--stop-on-defect': - $stopOnDefect = true; + case '--fail-on-deprecation': + $failOnDeprecation = true; break; - case '--stop-on-error': - $stopOnError = true; + case '--fail-on-empty-test-suite': + $failOnEmptyTestSuite = true; break; - case '--stop-on-failure': - $stopOnFailure = true; + case '--fail-on-incomplete': + $failOnIncomplete = true; break; - case '--stop-on-warning': - $stopOnWarning = true; + case '--fail-on-notice': + $failOnNotice = true; break; - case '--stop-on-incomplete': - $stopOnIncomplete = true; + case '--fail-on-risky': + $failOnRisky = true; break; - case '--stop-on-risky': - $stopOnRisky = true; + case '--fail-on-skipped': + $failOnSkipped = true; break; - case '--stop-on-skipped': - $stopOnSkipped = true; + case '--fail-on-warning': + $failOnWarning = true; break; - case '--fail-on-empty-test-suite': - $failOnEmptyTestSuite = true; + case '--stop-on-defect': + $stopOnDefect = true; break; - case '--fail-on-incomplete': - $failOnIncomplete = true; + case '--stop-on-deprecation': + $stopOnDeprecation = true; break; - case '--fail-on-risky': - $failOnRisky = true; + case '--stop-on-error': + $stopOnError = true; break; - case '--fail-on-skipped': - $failOnSkipped = true; + case '--stop-on-failure': + $stopOnFailure = true; break; - case '--fail-on-warning': - $failOnWarning = true; + case '--stop-on-incomplete': + $stopOnIncomplete = true; + + break; + + case '--stop-on-notice': + $stopOnNotice = true; + + break; + + case '--stop-on-risky': + $stopOnRisky = true; + + break; + + case '--stop-on-skipped': + $stopOnSkipped = true; + + break; + + case '--stop-on-warning': + $stopOnWarning = true; break; @@ -800,11 +828,22 @@ public function fromParameters(array $parameters): Configuration $excludeGroups, $executionOrder, $executionOrderDefects, + $failOnDeprecation, $failOnEmptyTestSuite, $failOnIncomplete, + $failOnNotice, $failOnRisky, $failOnSkipped, $failOnWarning, + $stopOnDefect, + $stopOnDeprecation, + $stopOnError, + $stopOnFailure, + $stopOnIncomplete, + $stopOnNotice, + $stopOnRisky, + $stopOnSkipped, + $stopOnWarning, $filter, $generateConfiguration, $migrateConfiguration, @@ -832,13 +871,6 @@ public function fromParameters(array $parameters): Configuration $reverseList, $stderr, $strictCoverage, - $stopOnDefect, - $stopOnError, - $stopOnFailure, - $stopOnIncomplete, - $stopOnRisky, - $stopOnSkipped, - $stopOnWarning, $teamcityLogfile, $testdoxHtmlFile, $testdoxTextFile, diff --git a/src/TextUI/Configuration/Cli/Configuration.php b/src/TextUI/Configuration/Cli/Configuration.php index 4b68fd51f70..1afff6a14aa 100644 --- a/src/TextUI/Configuration/Cli/Configuration.php +++ b/src/TextUI/Configuration/Cli/Configuration.php @@ -49,11 +49,22 @@ final class Configuration private readonly ?array $excludeGroups; private readonly ?int $executionOrder; private readonly ?int $executionOrderDefects; + private readonly ?bool $failOnDeprecation; private readonly ?bool $failOnEmptyTestSuite; private readonly ?bool $failOnIncomplete; + private readonly ?bool $failOnNotice; private readonly ?bool $failOnRisky; private readonly ?bool $failOnSkipped; private readonly ?bool $failOnWarning; + private readonly ?bool $stopOnDefect; + private readonly ?bool $stopOnDeprecation; + private readonly ?bool $stopOnError; + private readonly ?bool $stopOnFailure; + private readonly ?bool $stopOnIncomplete; + private readonly ?bool $stopOnNotice; + private readonly ?bool $stopOnRisky; + private readonly ?bool $stopOnSkipped; + private readonly ?bool $stopOnWarning; private readonly ?string $filter; private readonly bool $generateConfiguration; private readonly bool $migrateConfiguration; @@ -81,13 +92,6 @@ final class Configuration private readonly ?bool $reverseList; private readonly ?bool $stderr; private readonly ?bool $strictCoverage; - private readonly ?bool $stopOnDefect; - private readonly ?bool $stopOnError; - private readonly ?bool $stopOnFailure; - private readonly ?bool $stopOnIncomplete; - private readonly ?bool $stopOnRisky; - private readonly ?bool $stopOnSkipped; - private readonly ?bool $stopOnWarning; private readonly ?string $teamcityLogfile; private readonly ?bool $teamCityPrinter; private readonly ?string $testdoxHtmlFile; @@ -114,7 +118,7 @@ final class Configuration /** * @psalm-param ?non-empty-list $testSuffixes */ - public function __construct(?string $argument, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticProperties, ?bool $beStrictAboutChangesToGlobalState, ?string $bootstrap, ?string $cacheDirectory, ?bool $cacheResult, ?string $cacheResultFile, bool $checkVersion, ?string $colors, null|int|string $columns, ?string $configurationFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, ?string $coverageCacheDirectory, bool $warmCoverageCache, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?string $filter, bool $generateConfiguration, bool $migrateConfiguration, ?array $groups, ?array $testsCovering, ?array $testsUsing, bool $help, ?string $includePath, ?array $iniSettings, ?string $junitLogfile, bool $listGroups, bool $listSuites, bool $listTests, ?string $listTestsXml, ?bool $noCoverage, ?bool $noExtensions, ?bool $noOutput, ?bool $noProgress, ?bool $noResults, ?bool $noLogging, ?bool $processIsolation, ?int $randomOrderSeed, ?bool $reportUselessTests, ?bool $resolveDependencies, ?bool $reverseList, ?bool $stderr, ?bool $strictCoverage, ?bool $stopOnDefect, ?bool $stopOnError, ?bool $stopOnFailure, ?bool $stopOnIncomplete, ?bool $stopOnRisky, ?bool $stopOnSkipped, ?bool $stopOnWarning, ?string $teamcityLogfile, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?array $testSuffixes, ?string $testSuite, ?string $excludeTestSuite, bool $useDefaultConfiguration, ?bool $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $printerTestDox) + public function __construct(?string $argument, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticProperties, ?bool $beStrictAboutChangesToGlobalState, ?string $bootstrap, ?string $cacheDirectory, ?bool $cacheResult, ?string $cacheResultFile, bool $checkVersion, ?string $colors, null|int|string $columns, ?string $configurationFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, ?string $coverageCacheDirectory, bool $warmCoverageCache, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?bool $failOnDeprecation, ?bool $failOnEmptyTestSuite, ?bool $failOnIncomplete, ?bool $failOnNotice, ?bool $failOnRisky, ?bool $failOnSkipped, ?bool $failOnWarning, ?bool $stopOnDefect, ?bool $stopOnDeprecation, ?bool $stopOnError, ?bool $stopOnFailure, ?bool $stopOnIncomplete, ?bool $stopOnNotice, ?bool $stopOnRisky, ?bool $stopOnSkipped, ?bool $stopOnWarning, ?string $filter, bool $generateConfiguration, bool $migrateConfiguration, ?array $groups, ?array $testsCovering, ?array $testsUsing, bool $help, ?string $includePath, ?array $iniSettings, ?string $junitLogfile, bool $listGroups, bool $listSuites, bool $listTests, ?string $listTestsXml, ?bool $noCoverage, ?bool $noExtensions, ?bool $noOutput, ?bool $noProgress, ?bool $noResults, ?bool $noLogging, ?bool $processIsolation, ?int $randomOrderSeed, ?bool $reportUselessTests, ?bool $resolveDependencies, ?bool $reverseList, ?bool $stderr, ?bool $strictCoverage, ?string $teamcityLogfile, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?array $testSuffixes, ?string $testSuite, ?string $excludeTestSuite, bool $useDefaultConfiguration, ?bool $displayDetailsOnIncompleteTests, ?bool $displayDetailsOnSkippedTests, ?bool $displayDetailsOnTestsThatTriggerDeprecations, ?bool $displayDetailsOnTestsThatTriggerErrors, ?bool $displayDetailsOnTestsThatTriggerNotices, ?bool $displayDetailsOnTestsThatTriggerWarnings, bool $version, ?array $coverageFilter, ?string $logEventsText, ?string $logEventsVerboseText, ?bool $printerTeamCity, ?bool $printerTestDox) { $this->argument = $argument; $this->atLeastVersion = $atLeastVersion; @@ -149,11 +153,22 @@ public function __construct(?string $argument, ?string $atLeastVersion, ?bool $b $this->excludeGroups = $excludeGroups; $this->executionOrder = $executionOrder; $this->executionOrderDefects = $executionOrderDefects; + $this->failOnDeprecation = $failOnDeprecation; $this->failOnEmptyTestSuite = $failOnEmptyTestSuite; $this->failOnIncomplete = $failOnIncomplete; + $this->failOnNotice = $failOnNotice; $this->failOnRisky = $failOnRisky; $this->failOnSkipped = $failOnSkipped; $this->failOnWarning = $failOnWarning; + $this->stopOnDefect = $stopOnDefect; + $this->stopOnDeprecation = $stopOnDeprecation; + $this->stopOnError = $stopOnError; + $this->stopOnFailure = $stopOnFailure; + $this->stopOnIncomplete = $stopOnIncomplete; + $this->stopOnNotice = $stopOnNotice; + $this->stopOnRisky = $stopOnRisky; + $this->stopOnSkipped = $stopOnSkipped; + $this->stopOnWarning = $stopOnWarning; $this->filter = $filter; $this->generateConfiguration = $generateConfiguration; $this->migrateConfiguration = $migrateConfiguration; @@ -181,13 +196,6 @@ public function __construct(?string $argument, ?string $atLeastVersion, ?bool $b $this->reverseList = $reverseList; $this->stderr = $stderr; $this->strictCoverage = $strictCoverage; - $this->stopOnDefect = $stopOnDefect; - $this->stopOnError = $stopOnError; - $this->stopOnFailure = $stopOnFailure; - $this->stopOnIncomplete = $stopOnIncomplete; - $this->stopOnRisky = $stopOnRisky; - $this->stopOnSkipped = $stopOnSkipped; - $this->stopOnWarning = $stopOnWarning; $this->teamcityLogfile = $teamcityLogfile; $this->testdoxHtmlFile = $testdoxHtmlFile; $this->testdoxTextFile = $testdoxTextFile; @@ -838,6 +846,26 @@ public function executionOrderDefects(): int return $this->executionOrderDefects; } + /** + * @psalm-assert-if-true !null $this->failOnDeprecation + */ + public function hasFailOnDeprecation(): bool + { + return $this->failOnDeprecation !== null; + } + + /** + * @throws Exception + */ + public function failOnDeprecation(): bool + { + if (!$this->hasFailOnDeprecation()) { + throw new Exception; + } + + return $this->failOnDeprecation; + } + /** * @psalm-assert-if-true !null $this->failOnEmptyTestSuite */ @@ -878,6 +906,26 @@ public function failOnIncomplete(): bool return $this->failOnIncomplete; } + /** + * @psalm-assert-if-true !null $this->failOnNotice + */ + public function hasFailOnNotice(): bool + { + return $this->failOnNotice !== null; + } + + /** + * @throws Exception + */ + public function failOnNotice(): bool + { + if (!$this->hasFailOnNotice()) { + throw new Exception; + } + + return $this->failOnNotice; + } + /** * @psalm-assert-if-true !null $this->failOnRisky */ @@ -938,6 +986,186 @@ public function failOnWarning(): bool return $this->failOnWarning; } + /** + * @psalm-assert-if-true !null $this->stopOnDefect + */ + public function hasStopOnDefect(): bool + { + return $this->stopOnDefect !== null; + } + + /** + * @throws Exception + */ + public function stopOnDefect(): bool + { + if (!$this->hasStopOnDefect()) { + throw new Exception; + } + + return $this->stopOnDefect; + } + + /** + * @psalm-assert-if-true !null $this->stopOnDeprecation + */ + public function hasStopOnDeprecation(): bool + { + return $this->stopOnDeprecation !== null; + } + + /** + * @throws Exception + */ + public function stopOnDeprecation(): bool + { + if (!$this->hasStopOnDeprecation()) { + throw new Exception; + } + + return $this->stopOnDeprecation; + } + + /** + * @psalm-assert-if-true !null $this->stopOnError + */ + public function hasStopOnError(): bool + { + return $this->stopOnError !== null; + } + + /** + * @throws Exception + */ + public function stopOnError(): bool + { + if (!$this->hasStopOnError()) { + throw new Exception; + } + + return $this->stopOnError; + } + + /** + * @psalm-assert-if-true !null $this->stopOnFailure + */ + public function hasStopOnFailure(): bool + { + return $this->stopOnFailure !== null; + } + + /** + * @throws Exception + */ + public function stopOnFailure(): bool + { + if (!$this->hasStopOnFailure()) { + throw new Exception; + } + + return $this->stopOnFailure; + } + + /** + * @psalm-assert-if-true !null $this->stopOnIncomplete + */ + public function hasStopOnIncomplete(): bool + { + return $this->stopOnIncomplete !== null; + } + + /** + * @throws Exception + */ + public function stopOnIncomplete(): bool + { + if (!$this->hasStopOnIncomplete()) { + throw new Exception; + } + + return $this->stopOnIncomplete; + } + + /** + * @psalm-assert-if-true !null $this->stopOnNotice + */ + public function hasStopOnNotice(): bool + { + return $this->stopOnNotice !== null; + } + + /** + * @throws Exception + */ + public function stopOnNotice(): bool + { + if (!$this->hasStopOnNotice()) { + throw new Exception; + } + + return $this->stopOnNotice; + } + + /** + * @psalm-assert-if-true !null $this->stopOnRisky + */ + public function hasStopOnRisky(): bool + { + return $this->stopOnRisky !== null; + } + + /** + * @throws Exception + */ + public function stopOnRisky(): bool + { + if (!$this->hasStopOnRisky()) { + throw new Exception; + } + + return $this->stopOnRisky; + } + + /** + * @psalm-assert-if-true !null $this->stopOnSkipped + */ + public function hasStopOnSkipped(): bool + { + return $this->stopOnSkipped !== null; + } + + /** + * @throws Exception + */ + public function stopOnSkipped(): bool + { + if (!$this->hasStopOnSkipped()) { + throw new Exception; + } + + return $this->stopOnSkipped; + } + + /** + * @psalm-assert-if-true !null $this->stopOnWarning + */ + public function hasStopOnWarning(): bool + { + return $this->stopOnWarning !== null; + } + + /** + * @throws Exception + */ + public function stopOnWarning(): bool + { + if (!$this->hasStopOnWarning()) { + throw new Exception; + } + + return $this->stopOnWarning; + } + /** * @psalm-assert-if-true !null $this->filter */ @@ -1388,146 +1616,6 @@ public function strictCoverage(): bool return $this->strictCoverage; } - /** - * @psalm-assert-if-true !null $this->stopOnDefect - */ - public function hasStopOnDefect(): bool - { - return $this->stopOnDefect !== null; - } - - /** - * @throws Exception - */ - public function stopOnDefect(): bool - { - if (!$this->hasStopOnDefect()) { - throw new Exception; - } - - return $this->stopOnDefect; - } - - /** - * @psalm-assert-if-true !null $this->stopOnError - */ - public function hasStopOnError(): bool - { - return $this->stopOnError !== null; - } - - /** - * @throws Exception - */ - public function stopOnError(): bool - { - if (!$this->hasStopOnError()) { - throw new Exception; - } - - return $this->stopOnError; - } - - /** - * @psalm-assert-if-true !null $this->stopOnFailure - */ - public function hasStopOnFailure(): bool - { - return $this->stopOnFailure !== null; - } - - /** - * @throws Exception - */ - public function stopOnFailure(): bool - { - if (!$this->hasStopOnFailure()) { - throw new Exception; - } - - return $this->stopOnFailure; - } - - /** - * @psalm-assert-if-true !null $this->stopOnIncomplete - */ - public function hasStopOnIncomplete(): bool - { - return $this->stopOnIncomplete !== null; - } - - /** - * @throws Exception - */ - public function stopOnIncomplete(): bool - { - if (!$this->hasStopOnIncomplete()) { - throw new Exception; - } - - return $this->stopOnIncomplete; - } - - /** - * @psalm-assert-if-true !null $this->stopOnRisky - */ - public function hasStopOnRisky(): bool - { - return $this->stopOnRisky !== null; - } - - /** - * @throws Exception - */ - public function stopOnRisky(): bool - { - if (!$this->hasStopOnRisky()) { - throw new Exception; - } - - return $this->stopOnRisky; - } - - /** - * @psalm-assert-if-true !null $this->stopOnSkipped - */ - public function hasStopOnSkipped(): bool - { - return $this->stopOnSkipped !== null; - } - - /** - * @throws Exception - */ - public function stopOnSkipped(): bool - { - if (!$this->hasStopOnSkipped()) { - throw new Exception; - } - - return $this->stopOnSkipped; - } - - /** - * @psalm-assert-if-true !null $this->stopOnWarning - */ - public function hasStopOnWarning(): bool - { - return $this->stopOnWarning !== null; - } - - /** - * @throws Exception - */ - public function stopOnWarning(): bool - { - if (!$this->hasStopOnWarning()) { - throw new Exception; - } - - return $this->stopOnWarning; - } - /** * @psalm-assert-if-true !null $this->teamcityLogfile */ diff --git a/src/TextUI/Configuration/Configuration.php b/src/TextUI/Configuration/Configuration.php index 508da606904..f10ec804ee2 100644 --- a/src/TextUI/Configuration/Configuration.php +++ b/src/TextUI/Configuration/Configuration.php @@ -52,11 +52,22 @@ final class Configuration private readonly string $testResultCacheFile; private readonly bool $ignoreDeprecatedCodeUnitsFromCodeCoverage; private readonly bool $disableCodeCoverageIgnore; + private readonly bool $failOnDeprecation; private readonly bool $failOnEmptyTestSuite; private readonly bool $failOnIncomplete; + private readonly bool $failOnNotice; private readonly bool $failOnRisky; private readonly bool $failOnSkipped; private readonly bool $failOnWarning; + private readonly bool $stopOnDefect; + private readonly bool $stopOnDeprecation; + private readonly bool $stopOnError; + private readonly bool $stopOnFailure; + private readonly bool $stopOnIncomplete; + private readonly bool $stopOnNotice; + private readonly bool $stopOnRisky; + private readonly bool $stopOnSkipped; + private readonly bool $stopOnWarning; private readonly bool $outputToStandardErrorStream; private readonly int $columns; private readonly bool $noExtensions; @@ -71,13 +82,6 @@ final class Configuration private readonly bool $beStrictAboutChangesToGlobalState; private readonly bool $colors; private readonly bool $processIsolation; - private readonly bool $stopOnDefect; - private readonly bool $stopOnError; - private readonly bool $stopOnFailure; - private readonly bool $stopOnWarning; - private readonly bool $stopOnIncomplete; - private readonly bool $stopOnRisky; - private readonly bool $stopOnSkipped; private readonly bool $enforceTimeLimit; private readonly int $defaultTimeLimit; private readonly int $timeoutForSmallTests; @@ -131,7 +135,7 @@ final class Configuration * @psalm-param non-empty-list $testSuffixes * @psalm-param list}> $extensionBootstrappers */ - public function __construct(?string $cliArgument, ?string $configurationFile, ?string $bootstrap, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, FilterDirectoryCollection $coverageIncludeDirectories, FileCollection $coverageIncludeFiles, FilterDirectoryCollection $coverageExcludeDirectories, FileCollection $coverageExcludeFiles, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $outputToStandardErrorStream, int|string $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $stopOnDefect, bool $stopOnError, bool $stopOnFailure, bool $stopOnWarning, bool $stopOnIncomplete, bool $stopOnRisky, bool $stopOnSkipped, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $registerMockObjectsFromTestArgumentsRecursively, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, ?array $testsCovering, ?array $testsUsing, ?string $filter, ?array $groups, ?array $excludeGroups, int $randomOrderSeed, bool $includeUncoveredFiles, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php) + public function __construct(?string $cliArgument, ?string $configurationFile, ?string $bootstrap, bool $cacheResult, ?string $cacheDirectory, ?string $coverageCacheDirectory, FilterDirectoryCollection $coverageIncludeDirectories, FileCollection $coverageIncludeFiles, FilterDirectoryCollection $coverageExcludeDirectories, FileCollection $coverageExcludeFiles, string $testResultCacheFile, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4j, int $coverageCrap4jThreshold, ?string $coverageHtml, int $coverageHtmlLowUpperBound, int $coverageHtmlHighLowerBound, string $coverageHtmlColorSuccessLow, string $coverageHtmlColorSuccessMedium, string $coverageHtmlColorSuccessHigh, string $coverageHtmlColorWarning, string $coverageHtmlColorDanger, ?string $coverageHtmlCustomCssFile, ?string $coveragePhp, ?string $coverageText, bool $coverageTextShowUncoveredFiles, bool $coverageTextShowOnlySummary, ?string $coverageXml, bool $pathCoverage, bool $ignoreDeprecatedCodeUnitsFromCodeCoverage, bool $disableCodeCoverageIgnore, bool $failOnDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, bool $outputToStandardErrorStream, int|string $columns, bool $noExtensions, ?string $pharExtensionDirectory, array $extensionBootstrappers, bool $backupGlobals, bool $backupStaticProperties, bool $beStrictAboutChangesToGlobalState, bool $colors, bool $processIsolation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, bool $reportUselessTests, bool $strictCoverage, bool $disallowTestOutput, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, bool $registerMockObjectsFromTestArgumentsRecursively, bool $noProgress, bool $noResults, bool $noOutput, int $executionOrder, int $executionOrderDefects, bool $resolveDependencies, ?string $logfileTeamcity, ?string $logfileJunit, ?string $logfileTestdoxHtml, ?string $logfileTestdoxText, ?string $logEventsText, ?string $logEventsVerboseText, bool $teamCityOutput, bool $testDoxOutput, ?array $testsCovering, ?array $testsUsing, ?string $filter, ?array $groups, ?array $excludeGroups, int $randomOrderSeed, bool $includeUncoveredFiles, TestSuiteCollection $testSuite, string $includeTestSuite, string $excludeTestSuite, ?string $defaultTestSuite, array $testSuffixes, Php $php) { $this->cliArgument = $cliArgument; $this->configurationFile = $configurationFile; @@ -165,11 +169,22 @@ public function __construct(?string $cliArgument, ?string $configurationFile, ?s $this->pathCoverage = $pathCoverage; $this->ignoreDeprecatedCodeUnitsFromCodeCoverage = $ignoreDeprecatedCodeUnitsFromCodeCoverage; $this->disableCodeCoverageIgnore = $disableCodeCoverageIgnore; + $this->failOnDeprecation = $failOnDeprecation; $this->failOnEmptyTestSuite = $failOnEmptyTestSuite; $this->failOnIncomplete = $failOnIncomplete; + $this->failOnNotice = $failOnNotice; $this->failOnRisky = $failOnRisky; $this->failOnSkipped = $failOnSkipped; $this->failOnWarning = $failOnWarning; + $this->stopOnDefect = $stopOnDefect; + $this->stopOnDeprecation = $stopOnDeprecation; + $this->stopOnError = $stopOnError; + $this->stopOnFailure = $stopOnFailure; + $this->stopOnIncomplete = $stopOnIncomplete; + $this->stopOnNotice = $stopOnNotice; + $this->stopOnRisky = $stopOnRisky; + $this->stopOnSkipped = $stopOnSkipped; + $this->stopOnWarning = $stopOnWarning; $this->outputToStandardErrorStream = $outputToStandardErrorStream; $this->columns = $columns; $this->noExtensions = $noExtensions; @@ -180,13 +195,6 @@ public function __construct(?string $cliArgument, ?string $configurationFile, ?s $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; $this->colors = $colors; $this->processIsolation = $processIsolation; - $this->stopOnDefect = $stopOnDefect; - $this->stopOnError = $stopOnError; - $this->stopOnFailure = $stopOnFailure; - $this->stopOnWarning = $stopOnWarning; - $this->stopOnIncomplete = $stopOnIncomplete; - $this->stopOnRisky = $stopOnRisky; - $this->stopOnSkipped = $stopOnSkipped; $this->enforceTimeLimit = $enforceTimeLimit; $this->defaultTimeLimit = $defaultTimeLimit; $this->timeoutForSmallTests = $timeoutForSmallTests; @@ -604,6 +612,11 @@ public function coverageXml(): string return $this->coverageXml; } + public function failOnDeprecation(): bool + { + return $this->failOnDeprecation; + } + public function failOnEmptyTestSuite(): bool { return $this->failOnEmptyTestSuite; @@ -614,6 +627,11 @@ public function failOnIncomplete(): bool return $this->failOnIncomplete; } + public function failOnNotice(): bool + { + return $this->failOnNotice; + } + public function failOnRisky(): bool { return $this->failOnRisky; @@ -629,6 +647,51 @@ public function failOnWarning(): bool return $this->failOnWarning; } + public function stopOnDefect(): bool + { + return $this->stopOnDefect; + } + + public function stopOnDeprecation(): bool + { + return $this->stopOnDeprecation; + } + + public function stopOnError(): bool + { + return $this->stopOnError; + } + + public function stopOnFailure(): bool + { + return $this->stopOnFailure; + } + + public function stopOnIncomplete(): bool + { + return $this->stopOnIncomplete; + } + + public function stopOnNotice(): bool + { + return $this->stopOnNotice; + } + + public function stopOnRisky(): bool + { + return $this->stopOnRisky; + } + + public function stopOnSkipped(): bool + { + return $this->stopOnSkipped; + } + + public function stopOnWarning(): bool + { + return $this->stopOnWarning; + } + public function outputToStandardErrorStream(): bool { return $this->outputToStandardErrorStream; @@ -705,41 +768,6 @@ public function processIsolation(): bool return $this->processIsolation; } - public function stopOnDefect(): bool - { - return $this->stopOnDefect; - } - - public function stopOnError(): bool - { - return $this->stopOnError; - } - - public function stopOnFailure(): bool - { - return $this->stopOnFailure; - } - - public function stopOnWarning(): bool - { - return $this->stopOnWarning; - } - - public function stopOnIncomplete(): bool - { - return $this->stopOnIncomplete; - } - - public function stopOnRisky(): bool - { - return $this->stopOnRisky; - } - - public function stopOnSkipped(): bool - { - return $this->stopOnSkipped; - } - public function enforceTimeLimit(): bool { return $this->enforceTimeLimit; diff --git a/src/TextUI/Configuration/Merger.php b/src/TextUI/Configuration/Merger.php index 04f246eaae3..61f95e13f8a 100644 --- a/src/TextUI/Configuration/Merger.php +++ b/src/TextUI/Configuration/Merger.php @@ -115,6 +115,12 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $disableCodeCoverageIgnore = $xmlConfiguration->codeCoverage()->disableCodeCoverageIgnore(); } + if ($cliConfiguration->hasFailOnDeprecation()) { + $failOnDeprecation = $cliConfiguration->failOnDeprecation(); + } else { + $failOnDeprecation = $xmlConfiguration->phpunit()->failOnDeprecation(); + } + if ($cliConfiguration->hasFailOnEmptyTestSuite()) { $failOnEmptyTestSuite = $cliConfiguration->failOnEmptyTestSuite(); } else { @@ -127,6 +133,12 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $failOnIncomplete = $xmlConfiguration->phpunit()->failOnIncomplete(); } + if ($cliConfiguration->hasFailOnNotice()) { + $failOnNotice = $cliConfiguration->failOnNotice(); + } else { + $failOnNotice = $xmlConfiguration->phpunit()->failOnNotice(); + } + if ($cliConfiguration->hasFailOnRisky()) { $failOnRisky = $cliConfiguration->failOnRisky(); } else { @@ -145,6 +157,60 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $failOnWarning = $xmlConfiguration->phpunit()->failOnWarning(); } + if ($cliConfiguration->hasStopOnDefect()) { + $stopOnDefect = $cliConfiguration->stopOnDefect(); + } else { + $stopOnDefect = $xmlConfiguration->phpunit()->stopOnDefect(); + } + + if ($cliConfiguration->hasStopOnDeprecation()) { + $stopOnDeprecation = $cliConfiguration->stopOnDeprecation(); + } else { + $stopOnDeprecation = $xmlConfiguration->phpunit()->stopOnDeprecation(); + } + + if ($cliConfiguration->hasStopOnError()) { + $stopOnError = $cliConfiguration->stopOnError(); + } else { + $stopOnError = $xmlConfiguration->phpunit()->stopOnError(); + } + + if ($cliConfiguration->hasStopOnFailure()) { + $stopOnFailure = $cliConfiguration->stopOnFailure(); + } else { + $stopOnFailure = $xmlConfiguration->phpunit()->stopOnFailure(); + } + + if ($cliConfiguration->hasStopOnIncomplete()) { + $stopOnIncomplete = $cliConfiguration->stopOnIncomplete(); + } else { + $stopOnIncomplete = $xmlConfiguration->phpunit()->stopOnIncomplete(); + } + + if ($cliConfiguration->hasStopOnNotice()) { + $stopOnNotice = $cliConfiguration->stopOnNotice(); + } else { + $stopOnNotice = $xmlConfiguration->phpunit()->stopOnNotice(); + } + + if ($cliConfiguration->hasStopOnRisky()) { + $stopOnRisky = $cliConfiguration->stopOnRisky(); + } else { + $stopOnRisky = $xmlConfiguration->phpunit()->stopOnRisky(); + } + + if ($cliConfiguration->hasStopOnSkipped()) { + $stopOnSkipped = $cliConfiguration->stopOnSkipped(); + } else { + $stopOnSkipped = $xmlConfiguration->phpunit()->stopOnSkipped(); + } + + if ($cliConfiguration->hasStopOnWarning()) { + $stopOnWarning = $cliConfiguration->stopOnWarning(); + } else { + $stopOnWarning = $xmlConfiguration->phpunit()->stopOnWarning(); + } + if ($cliConfiguration->hasStderr() && $cliConfiguration->stderr()) { $outputToStandardErrorStream = true; } else { @@ -326,48 +392,6 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $processIsolation = $xmlConfiguration->phpunit()->processIsolation(); } - if ($cliConfiguration->hasStopOnDefect()) { - $stopOnDefect = $cliConfiguration->stopOnDefect(); - } else { - $stopOnDefect = $xmlConfiguration->phpunit()->stopOnDefect(); - } - - if ($cliConfiguration->hasStopOnError()) { - $stopOnError = $cliConfiguration->stopOnError(); - } else { - $stopOnError = $xmlConfiguration->phpunit()->stopOnError(); - } - - if ($cliConfiguration->hasStopOnFailure()) { - $stopOnFailure = $cliConfiguration->stopOnFailure(); - } else { - $stopOnFailure = $xmlConfiguration->phpunit()->stopOnFailure(); - } - - if ($cliConfiguration->hasStopOnWarning()) { - $stopOnWarning = $cliConfiguration->stopOnWarning(); - } else { - $stopOnWarning = $xmlConfiguration->phpunit()->stopOnWarning(); - } - - if ($cliConfiguration->hasStopOnIncomplete()) { - $stopOnIncomplete = $cliConfiguration->stopOnIncomplete(); - } else { - $stopOnIncomplete = $xmlConfiguration->phpunit()->stopOnIncomplete(); - } - - if ($cliConfiguration->hasStopOnRisky()) { - $stopOnRisky = $cliConfiguration->stopOnRisky(); - } else { - $stopOnRisky = $xmlConfiguration->phpunit()->stopOnRisky(); - } - - if ($cliConfiguration->hasStopOnSkipped()) { - $stopOnSkipped = $cliConfiguration->stopOnSkipped(); - } else { - $stopOnSkipped = $xmlConfiguration->phpunit()->stopOnSkipped(); - } - if ($cliConfiguration->hasEnforceTimeLimit()) { $enforceTimeLimit = $cliConfiguration->enforceTimeLimit(); } else { @@ -706,11 +730,22 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $pathCoverage, $xmlConfiguration->codeCoverage()->ignoreDeprecatedCodeUnits(), $disableCodeCoverageIgnore, + $failOnDeprecation, $failOnEmptyTestSuite, $failOnIncomplete, + $failOnNotice, $failOnRisky, $failOnSkipped, $failOnWarning, + $stopOnDefect, + $stopOnDeprecation, + $stopOnError, + $stopOnFailure, + $stopOnIncomplete, + $stopOnNotice, + $stopOnRisky, + $stopOnSkipped, + $stopOnWarning, $outputToStandardErrorStream, $columns, $noExtensions, @@ -721,13 +756,6 @@ public function merge(CliConfiguration $cliConfiguration, XmlConfiguration $xmlC $beStrictAboutChangesToGlobalState, $colors, $processIsolation, - $stopOnDefect, - $stopOnError, - $stopOnFailure, - $stopOnWarning, - $stopOnIncomplete, - $stopOnRisky, - $stopOnSkipped, $enforceTimeLimit, $defaultTimeLimit, $timeoutForSmallTests, diff --git a/src/TextUI/Configuration/Xml/DefaultConfiguration.php b/src/TextUI/Configuration/Xml/DefaultConfiguration.php index 3e783260c1e..d9a3dab016b 100644 --- a/src/TextUI/Configuration/Xml/DefaultConfiguration.php +++ b/src/TextUI/Configuration/Xml/DefaultConfiguration.php @@ -104,6 +104,10 @@ public static function create(): self false, false, false, + false, + false, + false, + false, null, false, false, diff --git a/src/TextUI/Configuration/Xml/Loader.php b/src/TextUI/Configuration/Xml/Loader.php index f28e3178414..ad2e0bcf819 100644 --- a/src/TextUI/Configuration/Xml/Loader.php +++ b/src/TextUI/Configuration/Xml/Loader.php @@ -750,18 +750,22 @@ private function phpunit(string $filename, DOMDocument $document): PHPUnit $requireCoverageMetadata, $bootstrap, $this->getBooleanAttribute($document->documentElement, 'processIsolation', false), + $this->getBooleanAttribute($document->documentElement, 'failOnDeprecation', false), $this->getBooleanAttribute($document->documentElement, 'failOnEmptyTestSuite', false), $this->getBooleanAttribute($document->documentElement, 'failOnIncomplete', false), + $this->getBooleanAttribute($document->documentElement, 'failOnNotice', false), $this->getBooleanAttribute($document->documentElement, 'failOnRisky', false), $this->getBooleanAttribute($document->documentElement, 'failOnSkipped', false), $this->getBooleanAttribute($document->documentElement, 'failOnWarning', false), $this->getBooleanAttribute($document->documentElement, 'stopOnDefect', false), + $this->getBooleanAttribute($document->documentElement, 'stopOnDeprecation', false), $this->getBooleanAttribute($document->documentElement, 'stopOnError', false), $this->getBooleanAttribute($document->documentElement, 'stopOnFailure', false), - $this->getBooleanAttribute($document->documentElement, 'stopOnWarning', false), $this->getBooleanAttribute($document->documentElement, 'stopOnIncomplete', false), + $this->getBooleanAttribute($document->documentElement, 'stopOnNotice', false), $this->getBooleanAttribute($document->documentElement, 'stopOnRisky', false), $this->getBooleanAttribute($document->documentElement, 'stopOnSkipped', false), + $this->getBooleanAttribute($document->documentElement, 'stopOnWarning', false), $extensionsDirectory, $this->getBooleanAttribute($document->documentElement, 'beStrictAboutChangesToGlobalState', false), $this->getBooleanAttribute($document->documentElement, 'beStrictAboutOutputDuringTests', false), diff --git a/src/TextUI/Configuration/Xml/PHPUnit.php b/src/TextUI/Configuration/Xml/PHPUnit.php index f83800a394f..dd73fa57333 100644 --- a/src/TextUI/Configuration/Xml/PHPUnit.php +++ b/src/TextUI/Configuration/Xml/PHPUnit.php @@ -32,18 +32,22 @@ final class PHPUnit private readonly bool $requireCoverageMetadata; private readonly ?string $bootstrap; private readonly bool $processIsolation; + private readonly bool $failOnDeprecation; private readonly bool $failOnEmptyTestSuite; private readonly bool $failOnIncomplete; + private readonly bool $failOnNotice; private readonly bool $failOnRisky; private readonly bool $failOnSkipped; private readonly bool $failOnWarning; private readonly bool $stopOnDefect; + private readonly bool $stopOnDeprecation; private readonly bool $stopOnError; private readonly bool $stopOnFailure; - private readonly bool $stopOnWarning; private readonly bool $stopOnIncomplete; + private readonly bool $stopOnNotice; private readonly bool $stopOnRisky; private readonly bool $stopOnSkipped; + private readonly bool $stopOnWarning; private readonly ?string $extensionsDirectory; private readonly bool $beStrictAboutChangesToGlobalState; private readonly bool $beStrictAboutOutputDuringTests; @@ -63,7 +67,7 @@ final class PHPUnit private readonly bool $registerMockObjectsFromTestArgumentsRecursively; private readonly bool $testdoxPrinter; - public function __construct(?string $cacheDirectory, bool $cacheResult, ?string $cacheResultFile, int|string $columns, string $colors, bool $stderr, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, ?string $bootstrap, bool $processIsolation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnError, bool $stopOnFailure, bool $stopOnWarning, bool $stopOnIncomplete, bool $stopOnRisky, bool $stopOnSkipped, ?string $extensionsDirectory, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutCoverageMetadata, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticProperties, bool $registerMockObjectsFromTestArgumentsRecursively, bool $testdoxPrinter) + public function __construct(?string $cacheDirectory, bool $cacheResult, ?string $cacheResultFile, int|string $columns, string $colors, bool $stderr, bool $displayDetailsOnIncompleteTests, bool $displayDetailsOnSkippedTests, bool $displayDetailsOnTestsThatTriggerDeprecations, bool $displayDetailsOnTestsThatTriggerErrors, bool $displayDetailsOnTestsThatTriggerNotices, bool $displayDetailsOnTestsThatTriggerWarnings, bool $reverseDefectList, bool $requireCoverageMetadata, ?string $bootstrap, bool $processIsolation, bool $failOnDeprecation, bool $failOnEmptyTestSuite, bool $failOnIncomplete, bool $failOnNotice, bool $failOnRisky, bool $failOnSkipped, bool $failOnWarning, bool $stopOnDefect, bool $stopOnDeprecation, bool $stopOnError, bool $stopOnFailure, bool $stopOnIncomplete, bool $stopOnNotice, bool $stopOnRisky, bool $stopOnSkipped, bool $stopOnWarning, ?string $extensionsDirectory, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutCoverageMetadata, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticProperties, bool $registerMockObjectsFromTestArgumentsRecursively, bool $testdoxPrinter) { $this->cacheDirectory = $cacheDirectory; $this->cacheResult = $cacheResult; @@ -81,18 +85,22 @@ public function __construct(?string $cacheDirectory, bool $cacheResult, ?string $this->requireCoverageMetadata = $requireCoverageMetadata; $this->bootstrap = $bootstrap; $this->processIsolation = $processIsolation; + $this->failOnDeprecation = $failOnDeprecation; $this->failOnEmptyTestSuite = $failOnEmptyTestSuite; $this->failOnIncomplete = $failOnIncomplete; + $this->failOnNotice = $failOnNotice; $this->failOnRisky = $failOnRisky; $this->failOnSkipped = $failOnSkipped; $this->failOnWarning = $failOnWarning; $this->stopOnDefect = $stopOnDefect; + $this->stopOnDeprecation = $stopOnDeprecation; $this->stopOnError = $stopOnError; $this->stopOnFailure = $stopOnFailure; - $this->stopOnWarning = $stopOnWarning; $this->stopOnIncomplete = $stopOnIncomplete; + $this->stopOnNotice = $stopOnNotice; $this->stopOnRisky = $stopOnRisky; $this->stopOnSkipped = $stopOnSkipped; + $this->stopOnWarning = $stopOnWarning; $this->extensionsDirectory = $extensionsDirectory; $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; $this->beStrictAboutOutputDuringTests = $beStrictAboutOutputDuringTests; @@ -242,6 +250,11 @@ public function processIsolation(): bool return $this->processIsolation; } + public function failOnDeprecation(): bool + { + return $this->failOnDeprecation; + } + public function failOnEmptyTestSuite(): bool { return $this->failOnEmptyTestSuite; @@ -252,6 +265,11 @@ public function failOnIncomplete(): bool return $this->failOnIncomplete; } + public function failOnNotice(): bool + { + return $this->failOnNotice; + } + public function failOnRisky(): bool { return $this->failOnRisky; @@ -272,6 +290,11 @@ public function stopOnDefect(): bool return $this->stopOnDefect; } + public function stopOnDeprecation(): bool + { + return $this->stopOnDeprecation; + } + public function stopOnError(): bool { return $this->stopOnError; @@ -282,14 +305,14 @@ public function stopOnFailure(): bool return $this->stopOnFailure; } - public function stopOnWarning(): bool + public function stopOnIncomplete(): bool { - return $this->stopOnWarning; + return $this->stopOnIncomplete; } - public function stopOnIncomplete(): bool + public function stopOnNotice(): bool { - return $this->stopOnIncomplete; + return $this->stopOnNotice; } public function stopOnRisky(): bool @@ -302,6 +325,11 @@ public function stopOnSkipped(): bool return $this->stopOnSkipped; } + public function stopOnWarning(): bool + { + return $this->stopOnWarning; + } + /** * @psalm-assert-if-true !null $this->extensionsDirectory */