mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-20 06:08:08 +01:00
Remove deprecated method className() for branch 2.2. (#19894)
This commit is contained in:
@@ -56,7 +56,7 @@ class ArrayHelperTest extends TestCase
|
||||
'_content' => 'test',
|
||||
'length' => 4,
|
||||
], ArrayHelper::toArray($object, [
|
||||
$object::className() => [
|
||||
$object::class => [
|
||||
'id', 'secret',
|
||||
'_content' => 'content',
|
||||
'length' => function ($post) {
|
||||
@@ -85,13 +85,13 @@ class ArrayHelperTest extends TestCase
|
||||
'id_plus_1' => 124,
|
||||
],
|
||||
], ArrayHelper::toArray($object, [
|
||||
$object::className() => [
|
||||
$object::class => [
|
||||
'id', 'subObject',
|
||||
'id_plus_1' => function ($post) {
|
||||
return $post->id + 1;
|
||||
},
|
||||
],
|
||||
$subObject::className() => [
|
||||
$subObject::class => [
|
||||
'id',
|
||||
'id_plus_1' => function ($post) {
|
||||
return $post->id + 1;
|
||||
@@ -107,7 +107,7 @@ class ArrayHelperTest extends TestCase
|
||||
'id_plus_1' => 124,
|
||||
],
|
||||
], ArrayHelper::toArray($object, [
|
||||
$subObject::className() => [
|
||||
$subObject::class => [
|
||||
'id',
|
||||
'id_plus_1' => function ($post) {
|
||||
return $post->id + 1;
|
||||
|
||||
Reference in New Issue
Block a user