Skip to content

Commit e76caaf

Browse files
committed
fix tests
1 parent ef21c55 commit e76caaf

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

src/Symfony/Component/VarDumper/Tests/Caster/PdoCasterTest.php

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function testCastPdo()
4343
$this->assertSame('NATURAL', $attr['CASE']->class);
4444
$this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class);
4545

46-
$xDump = <<<'EODUMP'
46+
if (\PHP_VERSION_ID >= 80215 && \PHP_VERSION_ID < 80300 || \PHP_VERSION_ID >= 80302) {
47+
$xDump = <<<'EODUMP'
4748
array:2 [
4849
"\x00~\x00inTransaction" => false
4950
"\x00~\x00attributes" => array:9 [
@@ -57,10 +58,31 @@ public function testCastPdo()
5758
"STATEMENT_CLASS" => array:%d [
5859
0 => "PDOStatement"%A
5960
]
61+
STRINGIFY_FETCHES => false
6062
"DEFAULT_FETCH_MODE" => BOTH
6163
]
6264
]
6365
EODUMP;
66+
} else {
67+
$xDump = <<<'EODUMP'
68+
array:2 [
69+
"\x00~\x00inTransaction" => false
70+
"\x00~\x00attributes" => array:9 [
71+
"CASE" => NATURAL
72+
"ERRMODE" => EXCEPTION
73+
"PERSISTENT" => false
74+
"DRIVER_NAME" => "sqlite"
75+
"ORACLE_NULLS" => NATURAL
76+
"CLIENT_VERSION" => "%s"
77+
"SERVER_VERSION" => "%s"
78+
"STATEMENT_CLASS" => array:%d [
79+
0 => "PDOStatement"%A
80+
]
81+
"DEFAULT_FETCH_MODE" => BOTH
82+
]
83+
]
84+
EODUMP;
85+
}
6486

6587
$this->assertDumpMatchesFormat($xDump, $cast);
6688
}

0 commit comments

Comments
 (0)