attachBehavior('a',new NewBehavior); $this->assertFalse($component->behaviorCalled); $this->assertFalse(method_exists($component,'test')); $this->assertEquals(2,$component->test()); $this->assertTrue($component->behaviorCalled); $this->setExpectedException('CException'); $component->test2(); } }