I am looking at the documentation for phpunit. Is there a difference between assertNotTrue and assertFalse? Also assertTrue vs assertNotFalse?
PHP is a dynamic language. A function is able to return a boolean in one case and any other type in another case. Let's look at the strrpos() function. It returns false if it did not find anything, but 0 if it has found something at the begining of the string.
So if the function returns the numeric 0 assertNotFalse is true, but assertTrue is false.
I have not used phpunit, but I believe assertNotTrue stands for falsey and assertFalse is for false. Similarly, I suppose assertNotFalse stands for truey and assertTrue stands for true. Read about truey and falsey, but, for example:
""
is falsey, because it is empty string, but it is not false
. "foo"
is truey, because it is not an empty string, but it is not true
.