/** * @expectedException Exception * @expectedExceptionMessage It is not a polygon, missing points! */ public function testGetPerimeterException() { $p1 = new Polygon(); $p1->getPerimeter(); }