Nimut / testing-framework

TYPO3 testing framework that provides base classes and configuration for PHPUnit tests
GNU General Public License v2.0
52 stars 25 forks source link

Property testFilesToDelete does not exist in tearDown method #69

Closed DanielSiepmann closed 6 years ago

DanielSiepmann commented 6 years ago

If you do not add the property to your class, unset will be called in https://github.com/Nimut/testing-framework/blob/master/src/TestingFramework/TestCase/UnitTestCase.php#L59 Which removes the property in our PHP 5.6.33-1+ubuntu16.04.1+deb.sury.org+1 (cli). On all other testes environments the property is jut null after calling unset which is fine as casting to array results in an empty array.

So your proposed solution was to switch code blocks to first iterate over the property before unsetting, as discussed in Slack.