Does SimpleTest turn off error/warnings?

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

Post Reply
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Does SimpleTest turn off error/warnings?

Post by nielsene »

I just spent more time than I would have liked tracking down a typo in a variable name. Normally I expect PHP to catch that for me, but it seems like SimpleTest turns off notices?
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

I don't think so. I seem to get all the undefined variable notices I'd expect. Maybe you've found a bug?
User avatar
sweatje
Forum Contributor
Posts: 277
Joined: Wed Jun 29, 2005 10:04 pm
Location: Iowa, USA

Post by sweatje »

Was the typo in your test code or in your subject code. If in your test code, were you including the test as a file?
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

The typo was in the test code.
User avatar
sweatje
Forum Contributor
Posts: 277
Joined: Wed Jun 29, 2005 10:04 pm
Location: Iowa, USA

Post by sweatje »

That is what I suspected.

I think if you are running a group test, and you are adding files, there is a bit of funky code which includes the code that does change the error reporting level. IIRC, it had something to do with the possibility of a PHP Fatal error in the test code, and having SimpleTest being able to run the other tests around it (but it was a while back when I ran into this, and I did not go back and check the code, so I could be completely off base). I think I posed something about this to the simpletest list, but I don't remember the timeframe or even any keywords that would help target a search. Sorry :(

Regards,
Jason
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

That sounds exactly like what I was doing, so I suspect thats it. I'll try digging around the addTestFile method. Thanks.

(Sill waiting for my copy of your book to arrive. I've at least gotten the shipping notice... but they seemed a little "unrealistic" in their delivery timeframe -- same day, when it shipped late afternoon on friday)
User avatar
sweatje
Forum Contributor
Posts: 277
Joined: Wed Jun 29, 2005 10:04 pm
Location: Iowa, USA

Post by sweatje »

I hope it will be worth the wait :)
Post Reply