/** * Tests that we throw the same exception istantiated in the answer. */ public function testSameException() { try { $this->answer->getAnswer(); } catch (Exception $e) { $this->assertSame($this->exception, $e); } }
/** * Tests that we throw the same exception instantiated in the answer. */ public function testSameException() { try { call_user_func($this->answer->getAnswerCallback('someObject', 'testMethod')); } catch (Exception $e) { $this->assertSame($this->exception, $e); } }