Skip to content

Commit 9748cf5

Browse files
committed
add add_custom_tracer_named test for unscoped global function
1 parent c6c50d9 commit 9748cf5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

agent/tests/test_user_instrument.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,17 @@ static void test_add_custom_tracer_named() {
165165
wr = nr_php_add_custom_tracer_named(NR_PSTR("scope_name::"));
166166
tlib_pass_if_null("add_custom_tracer_named with name ending with :", wr);
167167

168+
wr = nr_php_add_custom_tracer_named(NR_PSTR("function_name"));
169+
tlib_pass_if_not_null(
170+
"add_custom_tracer_named with valid name "
171+
"(unscoped global function)",
172+
wr);
173+
168174
wr = nr_php_add_custom_tracer_named(NR_PSTR("scope_name::function_name"));
169-
tlib_pass_if_not_null("add_custom_tracer_named with valid name", wr);
175+
tlib_pass_if_not_null(
176+
"add_custom_tracer_named with valid name "
177+
"(scoped method)",
178+
wr);
170179

171180
tlib_php_request_end();
172181
}

0 commit comments

Comments
 (0)