From a384f0535a6ec9f52eaf199eea4e48faa1f5aaaf Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 10 Jan 2023 09:57:21 +0100 Subject: [PATCH 1/2] Reorganize --- .../with-test-suffix}/AbstractTest.php | 0 ...dingAbstractTestClassWithTestSuffixTest.php | 14 ++++++++++++++ .../without-test-suffix}/AbstractTestCase.php | 0 ...gAbstractTestClassWithoutTestSuffixTest.php | 14 ++++++++++++++ .../abstract-test-class-with-test-suffix.phpt | 6 +++--- ...bstract-test-class-without-test-suffix.phpt | 6 +++--- ...g-abstract-test-class-with-test-suffix.phpt | 18 ++++++++++++++++++ ...bstract-test-class-without-test-suffix.phpt | 18 ++++++++++++++++++ .../generic/concrete-test-class.phpt | 18 ------------------ 9 files changed, 70 insertions(+), 24 deletions(-) rename tests/_files/{ => abstract/with-test-suffix}/AbstractTest.php (100%) create mode 100644 tests/_files/abstract/with-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithTestSuffixTest.php rename tests/_files/{ => abstract/without-test-suffix}/AbstractTestCase.php (100%) create mode 100644 tests/_files/abstract/without-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithoutTestSuffixTest.php rename tests/end-to-end/generic/{ => abstract-test-class}/abstract-test-class-with-test-suffix.phpt (73%) rename tests/end-to-end/generic/{ => abstract-test-class}/abstract-test-class-without-test-suffix.phpt (72%) create mode 100644 tests/end-to-end/generic/abstract-test-class/concrete-test-class-extending-abstract-test-class-with-test-suffix.phpt create mode 100644 tests/end-to-end/generic/abstract-test-class/concrete-test-class-extending-abstract-test-class-without-test-suffix.phpt delete mode 100644 tests/end-to-end/generic/concrete-test-class.phpt diff --git a/tests/_files/AbstractTest.php b/tests/_files/abstract/with-test-suffix/AbstractTest.php similarity index 100% rename from tests/_files/AbstractTest.php rename to tests/_files/abstract/with-test-suffix/AbstractTest.php diff --git a/tests/_files/abstract/with-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithTestSuffixTest.php b/tests/_files/abstract/with-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithTestSuffixTest.php new file mode 100644 index 00000000000..f7cf69ad134 --- /dev/null +++ b/tests/_files/abstract/with-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithTestSuffixTest.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\TestFixture; + +final class ConcreteTestClassExtendingAbstractTestClassWithTestSuffixTest extends AbstractTest +{ +} diff --git a/tests/_files/AbstractTestCase.php b/tests/_files/abstract/without-test-suffix/AbstractTestCase.php similarity index 100% rename from tests/_files/AbstractTestCase.php rename to tests/_files/abstract/without-test-suffix/AbstractTestCase.php diff --git a/tests/_files/abstract/without-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithoutTestSuffixTest.php b/tests/_files/abstract/without-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithoutTestSuffixTest.php new file mode 100644 index 00000000000..528d679382f --- /dev/null +++ b/tests/_files/abstract/without-test-suffix/ConcreteTestClassExtendingAbstractTestClassWithoutTestSuffixTest.php @@ -0,0 +1,14 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +namespace PHPUnit\TestFixture; + +final class ConcreteTestClassExtendingAbstractTestClassWithoutTestSuffixTest extends AbstractTestCase +{ +} diff --git a/tests/end-to-end/generic/abstract-test-class-with-test-suffix.phpt b/tests/end-to-end/generic/abstract-test-class/abstract-test-class-with-test-suffix.phpt similarity index 73% rename from tests/end-to-end/generic/abstract-test-class-with-test-suffix.phpt rename to tests/end-to-end/generic/abstract-test-class/abstract-test-class-with-test-suffix.phpt index 9793d48958f..10f15d46e35 100644 --- a/tests/end-to-end/generic/abstract-test-class-with-test-suffix.phpt +++ b/tests/end-to-end/generic/abstract-test-class/abstract-test-class-with-test-suffix.phpt @@ -1,13 +1,13 @@ --TEST-- -phpunit ../../_files/AbstractTest.php +phpunit ../../../_files/abstract/with-test-suffix/AbstractTest.php --FILE-- Date: Tue, 10 Jan 2023 10:02:18 +0100 Subject: [PATCH 2/2] Add tests for directory with abstract and concrete test class (with and without Test suffix in abstract test class name) --- ...d-abstract-test-class-with-test-suffix.phpt | 18 ++++++++++++++++++ ...bstract-test-class-without-test-suffix.phpt | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 tests/end-to-end/generic/abstract-test-class/directory-with-concrete-test-class-and-abstract-test-class-with-test-suffix.phpt create mode 100644 tests/end-to-end/generic/abstract-test-class/directory-with-concrete-test-class-and-abstract-test-class-without-test-suffix.phpt diff --git a/tests/end-to-end/generic/abstract-test-class/directory-with-concrete-test-class-and-abstract-test-class-with-test-suffix.phpt b/tests/end-to-end/generic/abstract-test-class/directory-with-concrete-test-class-and-abstract-test-class-with-test-suffix.phpt new file mode 100644 index 00000000000..35bf84383fb --- /dev/null +++ b/tests/end-to-end/generic/abstract-test-class/directory-with-concrete-test-class-and-abstract-test-class-with-test-suffix.phpt @@ -0,0 +1,18 @@ +--TEST-- +phpunit ../../../_files/abstract/with-test-suffix +--FILE-- +