sebastianbergmann/phpunit — Issue #454: PHPunit not expect generic exception?
Author: yangzizhe
Created: 2012-01-06 04:12:04+00:00
State: open

InvalidArgumentException: You must not expect the generic exception class，
when I test

class MyTest extends PHPUnit_Framework_TestCase
{
/**
* @expectedException Exception
* @expectedExceptionMessage Some Message
*/
public function testExceptionHasRightMessage()
{
throw new Exception('Some Message', 20);
}
}

with PHPUnit3.6.7
why ?

IF PHPunit not expect generic exception , why the document has this example?