Browse Source

added test for calling unknown method of Component

tags/2.0.0-beta
Alexander Makarov 12 years ago
parent
commit
4c7bd953a1
  1. 6
      tests/unit/framework/base/ComponentTest.php

6
tests/unit/framework/base/ComponentTest.php

@ -123,6 +123,12 @@ class ComponentTest extends TestCase
$this->assertTrue(isset($this->component->p2)); $this->assertTrue(isset($this->component->p2));
} }
public function testCallUnknownMethod()
{
$this->setExpectedException('yii\base\UnknownMethodException');
$this->component->unknownMethod();
}
public function testUnset() public function testUnset()
{ {
unset($this->component->Text); unset($this->component->Text);

Loading…
Cancel
Save