/** * @expectedException Exception */ public function testExceptionRulesFreeOfContext() { $handler = RulesFreeOfContext::getInstance(); $this->assertEquals('RulesFreeOfContext', get_class($handler), "Class Does not match"); $handler->add('xxx'); }