[dev] [commits] Horde branch master updated. 474895f80a889d60dd40536cbcc35e6c14d1a732

Jan Schneider jan at horde.org
Fri Feb 3 10:17:41 UTC 2012


>     This is stupid: PHPUnit won't allow expecting a plain old 'Exception'
>     exception.  Which just seems like blatant broken behavior to me.  There
>     are several built-in PHP classes that throw Exception natively (e.g.
>     DateTime), so you can't explicitly check for errors. Dumb.

I guess the idea with expectedException might not be to test whether  
an exception occurred, but but to test that the correct exception  
occurred. Testing for "Exception" wouldn't make sense in this context  
because that would match any exception.
Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list