1616use Yiisoft \Db \Query \Query ;
1717use Yiisoft \Db \Schema \SchemaInterface ;
1818
19+ use function stream_get_contents ;
20+
1921/**
2022 * @group pgsql
2123 *
@@ -64,6 +66,7 @@ public function testPhpTypeCast(): void
6466 $ intColPhpTypeCast = $ tableSchema ->getColumn ('int_col ' )?->phpTypecast($ query ['int_col ' ]);
6567 $ charColPhpTypeCast = $ tableSchema ->getColumn ('char_col ' )?->phpTypecast($ query ['char_col ' ]);
6668 $ floatColPhpTypeCast = $ tableSchema ->getColumn ('float_col ' )?->phpTypecast($ query ['float_col ' ]);
69+ $ blobColPhpTypeCast = $ tableSchema ->getColumn ('blob_col ' )?->phpTypecast($ query ['blob_col ' ]);
6770 $ boolColPhpTypeCast = $ tableSchema ->getColumn ('bool_col ' )?->phpTypecast($ query ['bool_col ' ]);
6871 $ numericColPhpTypeCast = $ tableSchema ->getColumn ('numeric_col ' )?->phpTypecast($ query ['numeric_col ' ]);
6972 $ intArrayColPhpType = $ tableSchema ->getColumn ('intarray_col ' )?->phpTypecast($ query ['intarray_col ' ]);
@@ -77,6 +80,7 @@ public function testPhpTypeCast(): void
7780 $ this ->assertSame (1 , $ intColPhpTypeCast );
7881 $ this ->assertSame (str_repeat ('x ' , 100 ), $ charColPhpTypeCast );
7982 $ this ->assertSame (1.234 , $ floatColPhpTypeCast );
83+ $ this ->assertSame ("\x10\x11\x12" , stream_get_contents ($ blobColPhpTypeCast ));
8084 $ this ->assertFalse ($ boolColPhpTypeCast );
8185 $ this ->assertSame (33.22 , $ numericColPhpTypeCast );
8286 $ this ->assertSame ([1 , -2 , null , 42 ], $ intArrayColPhpType );
0 commit comments