Issue Bug Rejected

#88397PHPUnit Test fails with TYPO3 8.7.25: AbstractController -> getContentObject() on null

Julian Stock 05/20/19, 12:31 updated 05/21/19, 08:43

Description

Hi,

we’re using our own redirect extension, which tests throw some errors like the following when updating to something newer than TYPO3 8.7.24.

1) Vendor\VendorRedirect\Tests\Unit\Controller\RedirectControllerTest::testAddRedirectAction
Failed asserting that exception of type "Error" matches expected exception "TYPO3\CMS\Extbase\Mvc\Exception\StopActionException". Message was: "Call to a member function getContentObject() on null" at
/current/public/typo3conf/ext/vendor_redirect/typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php:359
/current/public/typo3conf/ext/vendor_redirect/typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php:326
/current/public/typo3conf/ext/vendor_redirect/Classes/Controller/RedirectController.php:145
/current/public/typo3conf/ext/vendor_redirect/Tests/Unit/Controller/RedirectControllerTest.php:263
.

/current/public/typo3conf/ext/vendor_redirect/vendor/phpunit/phpunit/phpunit:53

On older versions it’s working fine. I think the problem occurred with these changes: https://github.com/TYPO3/TYPO3.CMS/commit/e855f9cf674002e8137802997d6daebf3b3778dc#diff-e866bf1ab1a87cc4bc5b9b9c963d6823

Thanks for reading, have a nice day!
- Julian

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.