/** * @expectedException WMException * @expectedExceptionMessage NoSuchLink * @throws WMException */ public function testLinkAccessorException() { $this->object->getLink("nonexistent"); }