mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-06 07:24:44 +01:00
23 lines
301 B
PHP
23 lines
301 B
PHP
<?php
|
|
class Foo extends \yii\base\Object
|
|
{
|
|
public $prop;
|
|
}
|
|
|
|
/**
|
|
* ObjectTest
|
|
*/
|
|
class ObjectTest extends \yii\test\TestCase
|
|
{
|
|
public function testCreate()
|
|
{
|
|
$foo = Foo::create(array(
|
|
'prop' => array(
|
|
'test' => 'test',
|
|
),
|
|
));
|
|
|
|
$this->assertEquals('test', $foo->prop['test']);
|
|
}
|
|
}
|