Quantcast
Viewing all articles
Browse latest Browse all 4

How to unittest a failure of fopen using phpunit? - how to temporarily disable convertWarningsToExceptions?

Just a very quick tip on how to test for warnings that may happen in functions like fopen. PHP does not treat errors in unified way some of them rise warnings, some of them throws exceptions others return 0,false or -1 or some other value to indicate an error. How do you deal with them in PHP Unit?

read more


Viewing all articles
Browse latest Browse all 4

Trending Articles