public function testDetachingBehavior() { $behavior = new NewBehavior(); $this->component->attachBehavior('newBehavior', $behavior); $this->assertSame($behavior, $this->component->detachBehavior('newBehavior')); $this->assertFalse(isset($this->component->newBehavior)); }
public function testDetachBehavior() { $component = new NewComponent(); $behavior = new NewBehavior(); $component->attachBehavior('a', $behavior); $this->assertSame($behavior, $component->detachBehavior('a')); }