public function testExceptionRule() { $rule = new ExceptionRule(); try { $rule->applies(); $this->fail('should not come here'); } catch (Exception $e) { $this->assertEquals(Exception::CODE_GENERAL, $e->getCode()); } }