diff --git a/framework/base/Component.php b/framework/base/Component.php index 301fd39..edf3321 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -340,7 +340,6 @@ class Component extends \yii\base\Object /** * Returns the named behavior object. - * The name 'asa' stands for 'as a'. * @param string $behavior the behavior name * @return Behavior the behavior object, or null if the behavior does not exist */ diff --git a/tests/unit/framework/base/BehaviorTest.php b/tests/unit/framework/base/BehaviorTest.php index 009d859..4b4817b 100644 --- a/tests/unit/framework/base/BehaviorTest.php +++ b/tests/unit/framework/base/BehaviorTest.php @@ -36,8 +36,8 @@ class BehaviorTest extends \yiiunit\TestCase $bar->attachBehavior('bar', $behavior); $this->assertEquals('behavior property', $bar->behaviorProperty); $this->assertEquals('behavior method', $bar->behaviorMethod()); - $this->assertEquals('behavior property', $bar->asa('bar')->behaviorProperty); - $this->assertEquals('behavior method', $bar->asa('bar')->behaviorMethod()); + $this->assertEquals('behavior property', $bar->getBehavior('bar')->behaviorProperty); + $this->assertEquals('behavior method', $bar->getBehavior('bar')->behaviorMethod()); } public function testAutomaticAttach() diff --git a/tests/unit/framework/base/ComponentTest.php b/tests/unit/framework/base/ComponentTest.php index cdf6c80..60d5f7c 100644 --- a/tests/unit/framework/base/ComponentTest.php +++ b/tests/unit/framework/base/ComponentTest.php @@ -165,12 +165,12 @@ class ComponentTest extends \yiiunit\TestCase $component->test(); } - public function testAsa() + public function testGetBehavior() { $component = new NewComponent; $behavior = new NewBehavior; $component->attachBehavior('a', $behavior); - $this->assertSame($behavior, $component->asa('a')); + $this->assertSame($behavior, $component->getBehavior('a')); } public function testCreate()