Exemplo n.º 1
0
 /**
  * Test proxy behavior when the required method is implemented in several active state.
  */
 public function testCallMultipleImplementation()
 {
     $this->initializeProxy();
     $this->proxy->enableState('state2');
     $this->state1->allowMethod();
     $this->state2->allowMethod();
     try {
         $this->proxy->test();
     } catch (Exception\AvailableSeveralMethodImplementations $e) {
         return;
     } catch (\Exception $e) {
     }
     $this->fail('Error, the proxy must throw an Exception\\AvailableSeveralMethodImplementations when there are multiples implementations of a method in several enabled states');
 }