Skip to content

Commit 494b753

Browse files
committed
Fix tests
1 parent 06580e8 commit 494b753

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

tests/ext/dd_trace_span_link_with_exception.phpt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,18 @@ try {
5050
$rr->waitForFlush();
5151

5252
$root = json_decode($rr->replayRequest()["body"], true);
53-
$span = $root[0][0];
53+
$spans = $root["chunks"][0]["spans"] ?? $root[0];
54+
$span = $spans[0];
5455
var_dump($span['meta']['error.message']);
5556
var_dump($span['meta']['error.type']);
5657
var_dump($span['meta']['error.stack']);
5758
var_dump($span['meta']['_dd.span_links']);
5859
?>
5960
--EXPECTF--
6061
Caught exception: Oops!
61-
string(%d) "Uncaught Exception: Oops! in %s/dd_trace_span_link_with_exception.php:17"
62+
string(%d) "Uncaught Exception: Oops! in %sdd_trace_span_link_with_exception.php:17"
6263
string(9) "Exception"
63-
string(%d) "#0 %s/dd_trace_span_link_with_exception.php(12): Foo->doException()
64-
#1 %s/dd_trace_span_link_with_exception.php(33): Foo->bar()
64+
string(%d) "#0 %sdd_trace_span_link_with_exception.php(12): Foo->doException()
65+
#1 %sdd_trace_span_link_with_exception.php(33): Foo->bar()
6566
#2 {main}"
6667
string(33) "[{"trace_id":"42","span_id":"6"}]"

tests/ext/sandbox/install_hook/trace_closure.phpt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,30 @@ spans(\DDTrace\SpanData) (8) {
6666
result => 0
6767
_dd.p.tid => %s
6868
test\trace_closure.php:7\{closure} (trace_closure.php, 1, cli)
69-
closure.declaration => %s/tests/ext/sandbox/install_hook/trace_closure.php:7
69+
closure.declaration => %stests%cext%csandbox%cinstall_hook%ctrace_closure.php:7
7070
result => 1
7171
_dd.p.tid => %s
7272
test\foo.{closure} (trace_closure.php, 2, cli)
73-
closure.declaration => %s/tests/ext/sandbox/install_hook/trace_closure.php:12
73+
closure.declaration => %stests%cext%csandbox%cinstall_hook%ctrace_closure.php:12
7474
result => 2
7575
_dd.p.tid => %s
7676
test\bar.foo.{closure} (trace_closure.php, 3, cli)
77-
closure.declaration => %s/tests/ext/sandbox/install_hook/trace_closure.php:19
77+
closure.declaration => %stests%cext%csandbox%cinstall_hook%ctrace_closure.php:19
7878
result => 3
7979
_dd.p.tid => %s
8080
intval (trace_closure.php, 0, cli)
8181
result => 1
8282
_dd.p.tid => %s
8383
test\trace_closure.php:7\{closure} (trace_closure.php, 1, cli)
84-
closure.declaration => %s/tests/ext/sandbox/install_hook/trace_closure.php:7
84+
closure.declaration => %stests%cext%csandbox%cinstall_hook%ctrace_closure.php:7
8585
result => 2
8686
_dd.p.tid => %s
8787
test\foo.{closure} (trace_closure.php, 2, cli)
88-
closure.declaration => %s/tests/ext/sandbox/install_hook/trace_closure.php:12
88+
closure.declaration => %stests%cext%csandbox%cinstall_hook%ctrace_closure.php:12
8989
result => 3
9090
_dd.p.tid => %s
9191
test\bar.foo.{closure} (trace_closure.php, 3, cli)
92-
closure.declaration => %s/tests/ext/sandbox/install_hook/trace_closure.php:19
92+
closure.declaration => %stests%cext%csandbox%cinstall_hook%ctrace_closure.php:19
9393
result => 4
9494
_dd.p.tid => %s
9595
}

0 commit comments

Comments
 (0)