[TYPO3-core] RFC #4272: Inconsistent return values of ini_get() produce false positives for safe_mode detection

Peter Beernink p.beernink at drecomm.nl
Thu Oct 28 08:47:52 CEST 2010


On 27-10-2010 21:26, Helmut Hummel wrote:
> [...]
>
> Yes I did test the filter_var code with all possible return values of
> ini_get and it always returned the expected result.
Same here
>
> I did not test all things where the new class is used, because if the
> return value is right, then the replacement will be fine.
>
> Nevertheless your question reminds me that writing unit test is a good
> idea, I think for this new class it would also be usefull (have no time
> to wirte them right now though).

I have tried to build a unit test for this. But as I'm fairly new to 
unit testing, I'm not sure what to test, as it is not possible to mock 
an internal function for as far as I know.
The only solution for that would be to copy the functionality to the 
unit test, but than your still not testing the new class.

Peter

>
> Regards Helmut



More information about the TYPO3-team-core mailing list