8000 minor #53560 [VarDumper] fix tests (xabbuh) · symfony/symfony@afe2c27 · GitHub
[go: up one dir, main page]

Skip to content

Commit afe2c27

Browse files
committed
minor #53560 [VarDumper] fix tests (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [VarDumper] fix tests | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT see php/php-src@b333164 to see the impact compare https://github.com/symfony/symfony/actions/runs/7553027765/job/20563017582#step:8:2101 with https://github.com/symfony/symfony/actions/runs/7554827200/job/20568494086?pr=53560#step:8:2100 Commits ------- c3f0dc4 fix tests
2 parents 9e74afd + c3f0dc4 commit afe2c27

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

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

+23-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,28 @@ 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'
48+
array:2 [
49+
"\x00~\x00inTransaction" => false
50+
"\x00~\x00attributes" => array:10 [
51+
"CASE" => NATURAL
52+
"ERRMODE" => EXCEPTION
53+
"PERSISTENT" => false
54+
"DRIVER_NAME" => "sqlite"
55+
"ORACLE_NULLS" => NATURAL
56+
"CLIENT_VERSION" => "%s"
57+
"SERVER_VERSION" => "%s"
58+
"STATEMENT_CLASS" => array:%d [
59+
0 => "PDOStatement"%A
60+
]
61+
"STRINGIFY_FETCHES" => false
62+
"DEFAULT_FETCH_MODE" => BOTH
63+
]
64+
]
65+
EODUMP;
66+
} else {
67+
$xDump = <<<'EODUMP'
4768
array:2 [
4869
"\x00~\x00inTransaction" => false
4970
"\x00~\x00attributes" => array:9 [
@@ -61,6 +82,7 @@ public function testCastPdo()
6182
]
6283
]
6384
EODUMP;
85+
}
6486

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

0 commit comments

Comments
 (0)
0