public function testStubbedException() {
$mock = $this
->getMock('AnInterface');
$mock
->expects($this
->any())
->method('doSomething')
->will($this
->throwException(new Exception()));
try {
$mock
->doSomething();
} catch (Exception $e) {
return;
}
$this
->fail();
}