Skip to content

Commit 80e08d3

Browse files
committed
minor symfony#17781 [VarDumper] Fix tests on PHP 7 (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [VarDumper] Fix tests on PHP 7 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Supersedes symfony#17775 Commits ------- 5d433ca [VarDumper] Fix tests on PHP 7
2 parents ca6f1f7 + 5d433ca commit 80e08d3

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

src/Symfony/Component/VarDumper/Tests/CliDumperTest.php

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,12 @@ class: "Symfony\Component\VarDumper\Tests\CliDumperTest"
6969
7 => b"é\\x00"
7070
"[]" => []
7171
"res" => stream resource {@{$res}
72-
wrapper_type: "plainfile"
72+
%A wrapper_type: "plainfile"
7373
stream_type: "STDIO"
7474
mode: "r"
7575
unread_bytes: 0
7676
seekable: true
77-
timed_out: false
78-
blocked: true
79-
eof: false
80-
options: []
77+
%A options: []
8178
}
8279
"obj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d
8380
+foo: "foo"
@@ -197,16 +194,13 @@ public function testThrowingCaster()
197194
$this->assertStringMatchesFormat(
198195
<<<EOTXT
199196
stream resource {@{$ref}
200-
wrapper_type: "PHP"
197+
%Awrapper_type: "PHP"
201198
stream_type: "MEMORY"
202199
mode: "%s+b"
203200
unread_bytes: 0
204201
seekable: true
205202
uri: "php://memory"
206-
timed_out: false
207-
blocked: true
208-
eof: false
209-
options: []
203+
%Aoptions: []
210204
⚠: Symfony\Component\VarDumper\Exception\ThrowingCasterException {{$r}
211205
#message: "Unexpected Exception thrown from a caster: Foobar"
212206
trace: array:1 [

src/Symfony/Component/VarDumper/Tests/HtmlDumperTest.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,12 @@ public function testGet()
7272
<span class=sf-dump-key>7</span> => b"<span class=sf-dump-str title="2 binary or non-UTF-8 characters">&#233;</span>\\x00"
7373
"<span class=sf-dump-key>[]</span>" => []
7474
"<span class=sf-dump-key>res</span>" => <span class=sf-dump-note>stream resource</span> <a class=sf-dump-ref>@{$res}</a><samp>
75-
<span class=sf-dump-meta>wrapper_type</span>: "<span class=sf-dump-str title="9 characters">plainfile</span>"
75+
%A <span class=sf-dump-meta>wrapper_type</span>: "<span class=sf-dump-str title="9 characters">plainfile</span>"
7676
<span class=sf-dump-meta>stream_type</span>: "<span class=sf-dump-str title="5 characters">STDIO</span>"
7777
<span class=sf-dump-meta>mode</span>: "<span class=sf-dump-str>r</span>"
7878
<span class=sf-dump-meta>unread_bytes</span>: <span class=sf-dump-num>0</span>
7979
<span class=sf-dump-meta>seekable</span>: <span class=sf-dump-const>true</span>
80-
<span class=sf-dump-meta>timed_out</span>: <span class=sf-dump-const>false</span>
81-
<span class=sf-dump-meta>blocked</span>: <span class=sf-dump-const>true</span>
82-
<span class=sf-dump-meta>eof</span>: <span class=sf-dump-const>false</span>
83-
<span class=sf-dump-meta>options</span>: []
80+
%A <span class=sf-dump-meta>options</span>: []
8481
</samp>}
8582
"<span class=sf-dump-key>obj</span>" => <abbr title="Symfony\Component\VarDumper\Tests\Fixture\DumbFoo" class=sf-dump-note>DumbFoo</abbr> {<a class=sf-dump-ref href=#{$dumpId}-ref2%d title="2 occurrences">#%d</a><samp id={$dumpId}-ref2%d>
8683
+<span class=sf-dump-public title="Public property">foo</span>: "<span class=sf-dump-str title="3 characters">foo</span>"

0 commit comments

Comments
 (0)