Task #80144
closedLet child classes of functional tests tinker with the testExtensionsToLoad
0%
Description
Some of the functional test classes override the array $testExtensionsToLoad with an own value, positively blocking the addition of other extensions.
This might make sense in order to ensure an explicit testing setup for this extension exclusively. On the other hand it prevents the detection of side effects to other extensions.
During this writing, there is no difference, because the functional testing framework lacks the API to register test extensions globally, in order to include them into all tests.
In preparation of the feature 'add global test extensions to functional testing framework', the explicit declaration of $testExtensionsToLoad is moved to the setUp() function. So it is possible to extend the class again and reuse the tests for a global run with combined globally and locally registered test extensions.
Updated by Anja Leichsenring over 7 years ago
Usage example:
class ATest extends FunctionalTestCase { protected function setUp() { $this->testExtensionsToLoad = ['path/to/test/AExtension']; parent::setUp(); } public function testDummy() { // running a setup with active ext AExtension $this->assertTrue(true); } } // Bootstrap extension to globally load 'path/to/test/GlobalExtension' class BTest extends ATest { protected function setUp() { parent::setUp(); } public function testDummy() { // running a setup with active ext AExtension and GlobalExtension parent::testDummy(); } }
With this scenario, class ATest would run an exclusive test setup, class BTest would reuse the tests of class ATest and extend the setup with own extensions. To test hooks or signals, this kind of handling would allow for testing side effects and loading order issues.
Updated by Gerrit Code Review over 7 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51956
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51957
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51957
Updated by Gerrit Code Review over 7 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51957
Updated by Benni Mack over 7 years ago
- Target version changed from 8 LTS to next-patchlevel
Updated by Benni Mack almost 7 years ago
- Status changed from Under Review to Rejected