From 3f6704b8d759d980ed201aa775835f4e284821a8 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Mon, 25 Feb 2013 00:51:48 +0400 Subject: [PATCH] Added contructor test for Object, adjusted test itself --- tests/unit/framework/base/ObjectTest.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/unit/framework/base/ObjectTest.php b/tests/unit/framework/base/ObjectTest.php index f93b4af..5b95815 100644 --- a/tests/unit/framework/base/ObjectTest.php +++ b/tests/unit/framework/base/ObjectTest.php @@ -1,11 +1,13 @@ assertEquals(2, $this->object->execute(1)); } + + public function testConstruct() + { + $object = new NewObject(array('text' => 'test text')); + $this->assertEquals('test text', $object->getText()); + } } -class NewObject extends \yii\base\Component +class NewObject extends Object { private $_object = null; private $_text = 'default';