From 4c7bd953a1e390fd5e4bbd694f82144f9728467c Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Mon, 25 Feb 2013 02:32:59 +0400 Subject: [PATCH] added test for calling unknown method of Component --- tests/unit/framework/base/ComponentTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unit/framework/base/ComponentTest.php b/tests/unit/framework/base/ComponentTest.php index 5e01013..2c456e2 100644 --- a/tests/unit/framework/base/ComponentTest.php +++ b/tests/unit/framework/base/ComponentTest.php @@ -123,6 +123,12 @@ class ComponentTest extends TestCase $this->assertTrue(isset($this->component->p2)); } + public function testCallUnknownMethod() + { + $this->setExpectedException('yii\base\UnknownMethodException'); + $this->component->unknownMethod(); + } + public function testUnset() { unset($this->component->Text);