Exemplo n.º 1
0
 public function testCallMethodFromBehavior()
 {
     $this->component->attachBehavior('newBehavior', new NewBehavior());
     $this->assertSame(2, $this->component->test());
     try {
         $this->component->otherMethod();
     } catch (Exception $e) {
         $this->assertInstanceOf('CException', $e);
         $this->assertSame('NewComponent and its behaviors do not have a method or closure named "otherMethod".', $e->getMessage());
     }
 }