mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-08 00:47:55 +08:00
Use ::class instead of ::className() in tests. (#20612)
This commit is contained in:
@ -65,7 +65,7 @@ class ArrayHelperTest extends TestCase
|
||||
'_content' => 'test',
|
||||
'length' => 4,
|
||||
], ArrayHelper::toArray($object, [
|
||||
$object::className() => [
|
||||
get_class($object) => [
|
||||
'id', 'secret',
|
||||
'_content' => 'content',
|
||||
'length' => function ($post) {
|
||||
@ -94,13 +94,13 @@ class ArrayHelperTest extends TestCase
|
||||
'id_plus_1' => 124,
|
||||
],
|
||||
], ArrayHelper::toArray($object, [
|
||||
$object::className() => [
|
||||
get_class($object) => [
|
||||
'id', 'subObject',
|
||||
'id_plus_1' => function ($post) {
|
||||
return $post->id + 1;
|
||||
},
|
||||
],
|
||||
$subObject::className() => [
|
||||
get_class($subObject) => [
|
||||
'id',
|
||||
'id_plus_1' => function ($post) {
|
||||
return $post->id + 1;
|
||||
@ -116,7 +116,7 @@ class ArrayHelperTest extends TestCase
|
||||
'id_plus_1' => 124,
|
||||
],
|
||||
], ArrayHelper::toArray($object, [
|
||||
$subObject::className() => [
|
||||
get_class($subObject) => [
|
||||
'id',
|
||||
'id_plus_1' => function ($post) {
|
||||
return $post->id + 1;
|
||||
|
||||
Reference in New Issue
Block a user