1212use Yiisoft \ActiveRecord \Tests \Stubs \MagicActiveRecord \UserAR ;
1313use Yiisoft \ActiveRecord \Tests \Support \PgsqlHelper ;
1414use Yiisoft \Db \Connection \ConnectionInterface ;
15- use Yiisoft \Db \Expression \ArrayExpression ;
15+ use Yiisoft \Db \Expression \Value \ ArrayValue ;
1616use Yiisoft \Db \Expression \Expression ;
17- use Yiisoft \Db \Expression \JsonExpression ;
17+ use Yiisoft \Db \Expression \Value \ JsonValue ;
1818use Yiisoft \Db \Pgsql \Schema as SchemaPgsql ;
1919
2020final class MagicActiveRecordTest extends \Yiisoft \ActiveRecord \Tests \MagicActiveRecordTest
@@ -185,16 +185,16 @@ public static function arrayValuesProvider(): array
185185 return [
186186 'simple arrays values ' => [[
187187 'intarray_col ' => [
188- new ArrayExpression ([1 ,-2 ,null ,'42 ' ], 'int4 ' ),
188+ new ArrayValue ([1 ,-2 ,null ,'42 ' ], 'int4 ' ),
189189 [1 ,-2 ,null ,42 ],
190190 ],
191191 'textarray2_col ' => [
192- new ArrayExpression ([['text ' ], [null ], [1 ]], 'text[][] ' ),
192+ new ArrayValue ([['text ' ], [null ], [1 ]], 'text[][] ' ),
193193 [['text ' ], [null ], ['1 ' ]],
194194 ],
195195 'json_col ' => [['a ' => 1 , 'b ' => null , 'c ' => [1 ,3 ,5 ]]],
196196 'jsonb_col ' => [[null , 'a ' , 'b ' , '\" ' , '{"af"} ' ]],
197- 'jsonarray_col ' => [new ArrayExpression ([[', ' , 'null ' , true , 'false ' , 'f ' ]], 'json ' )],
197+ 'jsonarray_col ' => [new ArrayValue ([[', ' , 'null ' , true , 'false ' , 'f ' ]], 'json ' )],
198198 ]],
199199 'null arrays values ' => [[
200200 'intarray_col ' => [
@@ -219,19 +219,19 @@ public static function arrayValuesProvider(): array
219219 ]],
220220 'arrays packed in classes ' => [[
221221 'intarray_col ' => [
222- new ArrayExpression ([1 ,-2 ,null ,'42 ' ], 'int ' ),
222+ new ArrayValue ([1 ,-2 ,null ,'42 ' ], 'int ' ),
223223 [1 ,-2 ,null ,42 ],
224224 ],
225225 'textarray2_col ' => [
226- new ArrayExpression ([['text ' ], [null ], [1 ]], 'text[][] ' ),
226+ new ArrayValue ([['text ' ], [null ], [1 ]], 'text[][] ' ),
227227 [['text ' ], [null ], ['1 ' ]],
228228 ],
229229 'json_col ' => [
230- new JsonExpression (['a ' => 1 , 'b ' => null , 'c ' => [1 ,3 ,5 ]]),
230+ new JsonValue (['a ' => 1 , 'b ' => null , 'c ' => [1 ,3 ,5 ]]),
231231 ['a ' => 1 , 'b ' => null , 'c ' => [1 ,3 ,5 ]],
232232 ],
233233 'jsonb_col ' => [
234- new JsonExpression ([null , 'a ' , 'b ' , '\" ' , '{"af"} ' ]),
234+ new JsonValue ([null , 'a ' , 'b ' , '\" ' , '{"af"} ' ]),
235235 [null , 'a ' , 'b ' , '\" ' , '{"af"} ' ],
236236 ],
237237 'jsonarray_col ' => [
@@ -273,8 +273,8 @@ public function testArrayValues($properties): void
273273 $ expected = $ expected [1 ] ?? $ expected [0 ];
274274 $ value = $ type ->$ property ;
275275
276- if ($ expected instanceof ArrayExpression ) {
277- $ expected = $ expected ->getValue () ;
276+ if ($ expected instanceof ArrayValue ) {
277+ $ expected = $ expected ->value ;
278278 }
279279
280280 $ this ->assertSame ($ expected , $ value , 'In column ' . $ property );
0 commit comments