/** * Test proxy behavior when the required state in the call is not enabled. */ public function testCallMethodOfDisabledState() { $this->initializeProxy(); $this->proxy->enableState('state2'); $this->state1->disallowMethod(); $this->state2->disallowMethod(); try { $this->proxy->testOfState3(); } catch (Exception\MethodNotImplemented $e) { return; } catch (\Exception $e) { } $this->fail('Error, the proxy must throw an Exception\\MethodNotImplemented when the required state is not enabled'); }