From 92fbf4f523bcbe02d55a55faf7af465702452d42 Mon Sep 17 00:00:00 2001 From: Florian Engelhardt Date: Sun, 29 Nov 2020 20:26:58 +0100 Subject: [PATCH] --- phpunit.xsd | 2 - src/Runner/BaseTestRunner.php | 12 +-- src/TextUI/CliArguments/Builder.php | 8 -- src/TextUI/CliArguments/Configuration.php | 25 +----- src/TextUI/CliArguments/Mapper.php | 5 -- src/TextUI/Command.php | 80 +------------------ src/TextUI/TestRunner.php | 22 +---- src/TextUI/XmlConfiguration/Loader.php | 8 -- .../XmlConfiguration/PHPUnit/PHPUnit.php | 66 +-------------- tests/_files/configuration.xml | 1 - tests/_files/configuration_empty.xml | 1 - tests/_files/configuration_xinclude.xml | 1 - tests/end-to-end/regression/GitHub/1265.phpt | 20 ----- .../regression/GitHub/1265/Issue1265Test.php | 18 ----- .../regression/GitHub/1265/phpunit1265.xml | 2 - tests/unit/TextUI/XmlConfigurationTest.php | 3 - 16 files changed, 7 insertions(+), 267 deletions(-) delete mode 100644 tests/end-to-end/regression/GitHub/1265.phpt delete mode 100644 tests/end-to-end/regression/GitHub/1265/Issue1265Test.php delete mode 100644 tests/end-to-end/regression/GitHub/1265/phpunit1265.xml diff --git a/phpunit.xsd b/phpunit.xsd index 3785d21fef7..48ef6231860 100644 --- a/phpunit.xsd +++ b/phpunit.xsd @@ -244,8 +244,6 @@ - - diff --git a/src/Runner/BaseTestRunner.php b/src/Runner/BaseTestRunner.php index 75a70ca5fcc..0a986a0590a 100644 --- a/src/Runner/BaseTestRunner.php +++ b/src/Runner/BaseTestRunner.php @@ -68,14 +68,6 @@ abstract class BaseTestRunner */ public const SUITE_METHODNAME = 'suite'; - /** - * Returns the loader to be used. - */ - public function getLoader(): TestSuiteLoader - { - return new StandardTestSuiteLoader; - } - /** * Returns the Test corresponding to the given suite. * This is a template method, subclasses override @@ -140,10 +132,12 @@ public function getTest(string $suiteClassFile, $suffixes = ''): ?TestSuite /** * Returns the loaded ReflectionClass for a suite name. + * + * @throws \PHPUnit\Runner\Exception */ protected function loadSuiteClass(string $suiteClassFile): ReflectionClass { - return $this->getLoader()->load($suiteClassFile); + return (new StandardTestSuiteLoader)->load($suiteClassFile); } /** diff --git a/src/TextUI/CliArguments/Builder.php b/src/TextUI/CliArguments/Builder.php index 7d5e1b5b40d..e21eaf0b7c7 100644 --- a/src/TextUI/CliArguments/Builder.php +++ b/src/TextUI/CliArguments/Builder.php @@ -72,7 +72,6 @@ final class Builder 'list-suites', 'list-tests', 'list-tests-xml=', - 'loader=', 'log-junit=', 'log-teamcity=', 'migrate-configuration', @@ -196,7 +195,6 @@ public function fromParameters(array $parameters, array $additionalLongOptions): $listSuites = null; $listTests = null; $listTestsXml = null; - $loader = null; $noCoverage = null; $noExtensions = null; $noInteraction = null; @@ -433,11 +431,6 @@ public function fromParameters(array $parameters, array $additionalLongOptions): break; - case '--loader': - $loader = $option[1]; - - break; - case '--log-junit': $junitLogfile = $option[1]; @@ -846,7 +839,6 @@ public function fromParameters(array $parameters, array $additionalLongOptions): $listSuites, $listTests, $listTestsXml, - $loader, $noCoverage, $noExtensions, $noInteraction, diff --git a/src/TextUI/CliArguments/Configuration.php b/src/TextUI/CliArguments/Configuration.php index b220dd7aaa6..3078d3e3b05 100644 --- a/src/TextUI/CliArguments/Configuration.php +++ b/src/TextUI/CliArguments/Configuration.php @@ -297,11 +297,6 @@ final class Configuration */ private $listTestsXml; - /** - * @var ?string - */ - private $loader; - /** * @var ?bool */ @@ -475,7 +470,7 @@ final class Configuration /** * @param null|int|string $columns */ - public function __construct(?string $argument, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticAttributes, ?bool $beStrictAboutChangesToGlobalState, ?bool $beStrictAboutResourceUsageDuringSmallTests, ?string $bootstrap, ?bool $cacheResult, ?string $cacheResultFile, ?bool $checkVersion, ?string $colors, $columns, ?string $configuration, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, ?string $coverageCacheDirectory, ?bool $warmCoverageCache, ?bool $debug, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $disallowTodoAnnotatedTests, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?array $extensions, ?array $unavailableExtensions, ?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, ?string $loader, ?bool $noCoverage, ?bool $noExtensions, ?bool $noInteraction, ?bool $noLogging, ?string $printer, ?bool $processIsolation, ?int $randomOrderSeed, ?int $repeat, ?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, ?array $testdoxExcludeGroups, ?array $testdoxGroups, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?string $testdoxXmlFile, ?array $testSuffixes, ?string $testSuite, array $unrecognizedOptions, ?string $unrecognizedOrderBy, ?bool $useDefaultConfiguration, ?bool $verbose, ?bool $version, ?array $coverageFilter, ?string $xdebugFilterFile) + public function __construct(?string $argument, ?string $atLeastVersion, ?bool $backupGlobals, ?bool $backupStaticAttributes, ?bool $beStrictAboutChangesToGlobalState, ?bool $beStrictAboutResourceUsageDuringSmallTests, ?string $bootstrap, ?bool $cacheResult, ?string $cacheResultFile, ?bool $checkVersion, ?string $colors, $columns, ?string $configuration, ?string $coverageClover, ?string $coverageCobertura, ?string $coverageCrap4J, ?string $coverageHtml, ?string $coveragePhp, ?string $coverageText, ?bool $coverageTextShowUncoveredFiles, ?bool $coverageTextShowOnlySummary, ?string $coverageXml, ?bool $pathCoverage, ?string $coverageCacheDirectory, ?bool $warmCoverageCache, ?bool $debug, ?int $defaultTimeLimit, ?bool $disableCodeCoverageIgnore, ?bool $disallowTestOutput, ?bool $disallowTodoAnnotatedTests, ?bool $enforceTimeLimit, ?array $excludeGroups, ?int $executionOrder, ?int $executionOrderDefects, ?array $extensions, ?array $unavailableExtensions, ?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 $noInteraction, ?bool $noLogging, ?string $printer, ?bool $processIsolation, ?int $randomOrderSeed, ?int $repeat, ?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, ?array $testdoxExcludeGroups, ?array $testdoxGroups, ?string $testdoxHtmlFile, ?string $testdoxTextFile, ?string $testdoxXmlFile, ?array $testSuffixes, ?string $testSuite, array $unrecognizedOptions, ?string $unrecognizedOrderBy, ?bool $useDefaultConfiguration, ?bool $verbose, ?bool $version, ?array $coverageFilter, ?string $xdebugFilterFile) { $this->argument = $argument; $this->atLeastVersion = $atLeastVersion; @@ -533,7 +528,6 @@ public function __construct(?string $argument, ?string $atLeastVersion, ?bool $b $this->listSuites = $listSuites; $this->listTests = $listTests; $this->listTestsXml = $listTestsXml; - $this->loader = $loader; $this->noCoverage = $noCoverage; $this->noExtensions = $noExtensions; $this->noInteraction = $noInteraction; @@ -1488,23 +1482,6 @@ public function listTestsXml(): string return $this->listTestsXml; } - public function hasLoader(): bool - { - return $this->loader !== null; - } - - /** - * @throws Exception - */ - public function loader(): string - { - if ($this->loader === null) { - throw new Exception; - } - - return $this->loader; - } - public function hasNoCoverage(): bool { return $this->noCoverage !== null; diff --git a/src/TextUI/CliArguments/Mapper.php b/src/TextUI/CliArguments/Mapper.php index 9ceb8ab4728..415485bf9b7 100644 --- a/src/TextUI/CliArguments/Mapper.php +++ b/src/TextUI/CliArguments/Mapper.php @@ -25,7 +25,6 @@ public function mapToLegacyArray(Configuration $arguments): array 'listSuites' => false, 'listTests' => false, 'listTestsXml' => false, - 'loader' => null, 'useDefaultConfiguration' => true, 'loadedExtensions' => [], 'unavailableExtensions' => [], @@ -164,10 +163,6 @@ public function mapToLegacyArray(Configuration $arguments): array $result['printer'] = $arguments->printer(); } - if ($arguments->hasLoader()) { - $result['loader'] = $arguments->loader(); - } - if ($arguments->hasJunitLogfile()) { $result['junitLogfile'] = $arguments->junitLogfile(); } diff --git a/src/TextUI/Command.php b/src/TextUI/Command.php index 4ba761cec2c..f859c6b1f45 100644 --- a/src/TextUI/Command.php +++ b/src/TextUI/Command.php @@ -37,8 +37,6 @@ use function version_compare; use PHPUnit\Framework\TestSuite; use PHPUnit\Runner\Extension\PharLoader; -use PHPUnit\Runner\StandardTestSuiteLoader; -use PHPUnit\Runner\TestSuiteLoader; use PHPUnit\Runner\Version; use PHPUnit\TextUI\CliArguments\Builder; use PHPUnit\TextUI\CliArguments\Configuration; @@ -164,7 +162,7 @@ public function run(array $argv, bool $exit = true): int */ protected function createRunner(): TestRunner { - return new TestRunner($this->arguments['loader']); + return new TestRunner(); } /** @@ -294,10 +292,6 @@ protected function handleArguments(array $argv): void } } - if ($this->arguments['loader'] !== null) { - $this->arguments['loader'] = $this->handleLoader($this->arguments['loader']); - } - if (isset($this->arguments['configuration'])) { if (is_dir($this->arguments['configuration'])) { $candidate = $this->configurationFileInDirectory($this->arguments['configuration']); @@ -369,15 +363,6 @@ protected function handleArguments(array $argv): void ); } - if ($phpunitConfiguration->hasTestSuiteLoaderClass()) { - $file = $phpunitConfiguration->hasTestSuiteLoaderFile() ? $phpunitConfiguration->testSuiteLoaderFile() : ''; - - $this->arguments['loader'] = $this->handleLoader( - $phpunitConfiguration->testSuiteLoaderClass(), - $file - ); - } - if (!isset($this->arguments['testsuite']) && $phpunitConfiguration->hasDefaultTestSuite()) { $this->arguments['testsuite'] = $phpunitConfiguration->defaultTestSuite(); } @@ -415,69 +400,6 @@ protected function handleArguments(array $argv): void } } - /** - * Handles the loading of the PHPUnit\Runner\TestSuiteLoader implementation. - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - protected function handleLoader(string $loaderClass, string $loaderFile = ''): ?TestSuiteLoader - { - $this->warnings[] = 'Using a custom test suite loader is deprecated'; - - if (!class_exists($loaderClass, false)) { - if ($loaderFile == '') { - $loaderFile = Filesystem::classNameToFilename( - $loaderClass - ); - } - - $loaderFile = stream_resolve_include_path($loaderFile); - - if ($loaderFile) { - /** - * @noinspection PhpIncludeInspection - * @psalm-suppress UnresolvableInclude - */ - require $loaderFile; - } - } - - if (class_exists($loaderClass, false)) { - try { - $class = new ReflectionClass($loaderClass); - // @codeCoverageIgnoreStart - } catch (\ReflectionException $e) { - throw new ReflectionException( - $e->getMessage(), - (int) $e->getCode(), - $e - ); - } - // @codeCoverageIgnoreEnd - - if ($class->implementsInterface(TestSuiteLoader::class) && $class->isInstantiable()) { - $object = $class->newInstance(); - - assert($object instanceof TestSuiteLoader); - - return $object; - } - } - - if ($loaderClass == StandardTestSuiteLoader::class) { - return null; - } - - $this->exitWithErrorMessage( - sprintf( - 'Could not use "%s" as loader.', - $loaderClass - ) - ); - - return null; - } - /** * Handles the loading of the PHPUnit\Util\Printer implementation. * diff --git a/src/TextUI/TestRunner.php b/src/TextUI/TestRunner.php index ccca0039b08..1904ca41074 100644 --- a/src/TextUI/TestRunner.php +++ b/src/TextUI/TestRunner.php @@ -43,10 +43,8 @@ use PHPUnit\Runner\Hook; use PHPUnit\Runner\NullTestResultCache; use PHPUnit\Runner\ResultCacheExtension; -use PHPUnit\Runner\StandardTestSuiteLoader; use PHPUnit\Runner\TestHook; use PHPUnit\Runner\TestListenerAdapter; -use PHPUnit\Runner\TestSuiteLoader; use PHPUnit\Runner\TestSuiteSorter; use PHPUnit\Runner\Version; use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\FilterMapper; @@ -102,11 +100,6 @@ final class TestRunner extends BaseTestRunner */ private $codeCoverageFilter; - /** - * @var TestSuiteLoader - */ - private $loader; - /** * @var ResultPrinter */ @@ -127,14 +120,13 @@ final class TestRunner extends BaseTestRunner */ private $timer; - public function __construct(TestSuiteLoader $loader = null, CodeCoverageFilter $filter = null) + public function __construct(CodeCoverageFilter $filter = null) { if ($filter === null) { $filter = new CodeCoverageFilter; } $this->codeCoverageFilter = $filter; - $this->loader = $loader; $this->timer = new Timer; } @@ -833,18 +825,6 @@ public function run(TestSuite $suite, array $arguments = [], array $warnings = [ return $result; } - /** - * Returns the loader to be used. - */ - public function getLoader(): TestSuiteLoader - { - if ($this->loader === null) { - $this->loader = new StandardTestSuiteLoader; - } - - return $this->loader; - } - public function addExtension(Hook $extension): void { $this->extensions[] = $extension; diff --git a/src/TextUI/XmlConfiguration/Loader.php b/src/TextUI/XmlConfiguration/Loader.php index 63e20bd858c..88bd48687bd 100644 --- a/src/TextUI/XmlConfiguration/Loader.php +++ b/src/TextUI/XmlConfiguration/Loader.php @@ -1014,12 +1014,6 @@ private function phpunit(string $filename, DOMDocument $document): PHPUnit $extensionsDirectory = $this->toAbsolutePath($filename, $extensionsDirectory); } - $testSuiteLoaderFile = $this->getStringAttribute($document->documentElement, 'testSuiteLoaderFile'); - - if ($testSuiteLoaderFile !== null) { - $testSuiteLoaderFile = $this->toAbsolutePath($filename, $testSuiteLoaderFile); - } - $printerFile = $this->getStringAttribute($document->documentElement, 'printerFile'); if ($printerFile !== null) { @@ -1055,8 +1049,6 @@ private function phpunit(string $filename, DOMDocument $document): PHPUnit $this->getBooleanAttribute($document->documentElement, 'stopOnRisky', false), $this->getBooleanAttribute($document->documentElement, 'stopOnSkipped', false), $extensionsDirectory, - $this->getStringAttribute($document->documentElement, 'testSuiteLoaderClass'), - $testSuiteLoaderFile, $printerClass, $printerFile, $this->getBooleanAttribute($document->documentElement, 'beStrictAboutChangesToGlobalState', false), diff --git a/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php b/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php index edf298dd5ce..6c81ca5533a 100644 --- a/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php +++ b/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php @@ -155,20 +155,6 @@ final class PHPUnit */ private $extensionsDirectory; - /** - * @var ?string - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - private $testSuiteLoaderClass; - - /** - * @var ?string - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - private $testSuiteLoaderFile; - /** * @var ?string */ @@ -274,7 +260,7 @@ final class PHPUnit */ private $conflictBetweenPrinterClassAndTestdox; - public function __construct(bool $cacheResult, ?string $cacheResultFile, $columns, string $colors, bool $stderr, bool $noInteraction, bool $verbose, bool $reverseDefectList, bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions, bool $forceCoversAnnotation, ?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, ?string $testSuiteLoaderClass, ?string $testSuiteLoaderFile, ?string $printerClass, ?string $printerFile, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutResourceUsageDuringSmallTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutTodoAnnotatedTests, bool $beStrictAboutCoversAnnotation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticAttributes, bool $registerMockObjectsFromTestArgumentsRecursively, bool $conflictBetweenPrinterClassAndTestdox) + public function __construct(bool $cacheResult, ?string $cacheResultFile, $columns, string $colors, bool $stderr, bool $noInteraction, bool $verbose, bool $reverseDefectList, bool $convertDeprecationsToExceptions, bool $convertErrorsToExceptions, bool $convertNoticesToExceptions, bool $convertWarningsToExceptions, bool $forceCoversAnnotation, ?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, ?string $printerClass, ?string $printerFile, bool $beStrictAboutChangesToGlobalState, bool $beStrictAboutOutputDuringTests, bool $beStrictAboutResourceUsageDuringSmallTests, bool $beStrictAboutTestsThatDoNotTestAnything, bool $beStrictAboutTodoAnnotatedTests, bool $beStrictAboutCoversAnnotation, bool $enforceTimeLimit, int $defaultTimeLimit, int $timeoutForSmallTests, int $timeoutForMediumTests, int $timeoutForLargeTests, ?string $defaultTestSuite, int $executionOrder, bool $resolveDependencies, bool $defectsFirst, bool $backupGlobals, bool $backupStaticAttributes, bool $registerMockObjectsFromTestArgumentsRecursively, bool $conflictBetweenPrinterClassAndTestdox) { $this->cacheResult = $cacheResult; $this->cacheResultFile = $cacheResultFile; @@ -304,8 +290,6 @@ public function __construct(bool $cacheResult, ?string $cacheResultFile, $column $this->stopOnRisky = $stopOnRisky; $this->stopOnSkipped = $stopOnSkipped; $this->extensionsDirectory = $extensionsDirectory; - $this->testSuiteLoaderClass = $testSuiteLoaderClass; - $this->testSuiteLoaderFile = $testSuiteLoaderFile; $this->printerClass = $printerClass; $this->printerFile = $printerFile; $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; @@ -514,54 +498,6 @@ public function extensionsDirectory(): string return (string) $this->extensionsDirectory; } - /** - * @psalm-assert-if-true !null $this->testSuiteLoaderClass - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function hasTestSuiteLoaderClass(): bool - { - return $this->testSuiteLoaderClass !== null; - } - - /** - * @throws Exception - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function testSuiteLoaderClass(): string - { - if (!$this->hasTestSuiteLoaderClass()) { - throw new Exception('TestSuiteLoader class is not configured'); - } - - return (string) $this->testSuiteLoaderClass; - } - - /** - * @psalm-assert-if-true !null $this->testSuiteLoaderFile - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function hasTestSuiteLoaderFile(): bool - { - return $this->testSuiteLoaderFile !== null; - } - - /** - * @throws Exception - * - * @deprecated see https://github.com/sebastianbergmann/phpunit/issues/4039 - */ - public function testSuiteLoaderFile(): string - { - if (!$this->hasTestSuiteLoaderFile()) { - throw new Exception('TestSuiteLoader sourcecode file is not configured'); - } - - return (string) $this->testSuiteLoaderFile; - } - /** * @psalm-assert-if-true !null $this->printerClass */ diff --git a/tests/_files/configuration.xml b/tests/_files/configuration.xml index 889e73299c1..05ad04aae19 100644 --- a/tests/_files/configuration.xml +++ b/tests/_files/configuration.xml @@ -18,7 +18,6 @@ failOnWarning="false" extensionsDirectory="/tmp" printerClass="PHPUnit\TextUI\DefaultResultPrinter" - testSuiteLoaderClass="PHPUnit\Runner\StandardTestSuiteLoader" defaultTestSuite="My Test Suite" beStrictAboutChangesToGlobalState="false" beStrictAboutOutputDuringTests="false" diff --git a/tests/_files/configuration_empty.xml b/tests/_files/configuration_empty.xml index 31106ddb9b4..793b4536253 100644 --- a/tests/_files/configuration_empty.xml +++ b/tests/_files/configuration_empty.xml @@ -1,7 +1,6 @@ diff --git a/tests/_files/configuration_xinclude.xml b/tests/_files/configuration_xinclude.xml index 6aedb9e67a0..e5db0944fcf 100644 --- a/tests/_files/configuration_xinclude.xml +++ b/tests/_files/configuration_xinclude.xml @@ -17,7 +17,6 @@ failOnRisky="false" extensionsDirectory="/tmp" printerClass="PHPUnit\TextUI\DefaultResultPrinter" - testSuiteLoaderClass="PHPUnit\Runner\StandardTestSuiteLoader" defaultTestSuite="My Test Suite" beStrictAboutChangesToGlobalState="false" beStrictAboutOutputDuringTests="false" diff --git a/tests/end-to-end/regression/GitHub/1265.phpt b/tests/end-to-end/regression/GitHub/1265.phpt deleted file mode 100644 index 5ff7a04dbbc..00000000000 --- a/tests/end-to-end/regression/GitHub/1265.phpt +++ /dev/null @@ -1,20 +0,0 @@ ---TEST-- -GH-1265: Could not use "PHPUnit\Runner\StandardTestSuiteLoader" as loader ---FILE-- - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ -use PHPUnit\Framework\TestCase; - -class Issue1265Test extends TestCase -{ - public function testTrue(): void - { - $this->assertTrue(true); - } -} diff --git a/tests/end-to-end/regression/GitHub/1265/phpunit1265.xml b/tests/end-to-end/regression/GitHub/1265/phpunit1265.xml deleted file mode 100644 index 417c8e7e967..00000000000 --- a/tests/end-to-end/regression/GitHub/1265/phpunit1265.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/tests/unit/TextUI/XmlConfigurationTest.php b/tests/unit/TextUI/XmlConfigurationTest.php index c89b0534b1b..a0b040c3887 100644 --- a/tests/unit/TextUI/XmlConfigurationTest.php +++ b/tests/unit/TextUI/XmlConfigurationTest.php @@ -25,7 +25,6 @@ use function uniqid; use function unlink; use PHPUnit\Framework\TestCase; -use PHPUnit\Runner\StandardTestSuiteLoader; use PHPUnit\Runner\TestSuiteSorter; use PHPUnit\TextUI\DefaultResultPrinter; use PHPUnit\TextUI\XmlConfiguration\CodeCoverage\Filter\Directory; @@ -130,7 +129,6 @@ public function configurationRootOptionsProvider(): array 'failOnWarning' => ['failOnWarning', 'true', true], 'failOnRisky' => ['failOnRisky', 'true', true], 'processIsolation' => ['processIsolation', 'true', true], - 'testSuiteLoaderFile absolute path' => ['testSuiteLoaderFile', '/path/to/file', '/path/to/file'], 'reverseDefectList' => ['reverseDefectList', 'true', true], 'registerMockObjectsFromTestArgumentsRecursively' => ['registerMockObjectsFromTestArgumentsRecursively', 'true', true], ]; @@ -646,7 +644,6 @@ public function testPHPUnitConfigurationIsReadCorrectly(): void $this->assertFalse($phpunit->enforceTimeLimit()); $this->assertSame('/tmp', $phpunit->extensionsDirectory()); $this->assertSame(DefaultResultPrinter::class, $phpunit->printerClass()); - $this->assertSame(StandardTestSuiteLoader::class, $phpunit->testSuiteLoaderClass()); $this->assertSame('My Test Suite', $phpunit->defaultTestSuite()); $this->assertFalse($phpunit->verbose()); $this->assertSame(1, $phpunit->timeoutForSmallTests());