/** * @expectedException \Unteist\Exception\TestFailException * @expectedExceptionMessage Test was marked as failure by chosen strategy */ public function testUnexpectedExceptionWithAssociation() { $this->context->associateException('Exception', new TestFailStrategy()); $this->context->onUnexpectedException(new \Exception('Message')); }