Skip to content

Commit

Permalink
update tests to account for new default
Browse files Browse the repository at this point in the history
  • Loading branch information
lavarou committed Apr 19, 2024
1 parent 590d7f6 commit 30747ff
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 28 deletions.
8 changes: 4 additions & 4 deletions tests/integration/frameworks/wordpress/test_wordpress_00.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
- detect WordPress framework
- name the web transaction as an 'Action' named after the template used to generate the page
- detect custom plugins and themes
- generate hooks metrics for all callback functions executions; the execution time of callback
functions from wordpress core, custom plugins and themes is captured.
- generate hooks metrics only for plugins and themes callback functions executions;
only the execution time of callback functions from custom plugins and themes is captured.
No errors should be generated.
*/

Expand Down Expand Up @@ -40,11 +40,11 @@ functions from wordpress core, custom plugins and themes is captured.
Framework/WordPress/Plugin/mock-plugin2
Framework/WordPress/Plugin/mock-theme1
Framework/WordPress/Plugin/mock-theme2
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_METRICS_DONT_EXIST
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_ERROR_EVENTS null */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
- detect WordPress framework
- name the web transaction as an 'Action' named after the template used to generate the page
- detect custom plugins and themes
- generate hooks metrics for all callback functions executions; the execution time of callback
functions from wordpress core, custom plugins and themes is captured.
- generate hooks metrics only for plugins and themes callback functions executions;
only the execution time of callback functions from custom plugins and themes is captured.
No errors should be generated.
*/

Expand All @@ -32,11 +32,11 @@ functions from wordpress core, custom plugins and themes is captured.
Framework/WordPress/Plugin/mock-plugin2
Framework/WordPress/Plugin/mock-theme1
Framework/WordPress/Plugin/mock-theme2
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_METRICS_DONT_EXIST
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_ERROR_EVENTS null */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- detect WordPress framework
- name the web transaction as an 'Action' named after the template used to generate the page
- detect custom plugins and themes
- generate hooks metrics for all callback functions executions; the execution time of callback
functions from wordpress core, custom plugins and themes is captured.
- generate hooks metrics only for plugins and themes callback functions executions;
only the execution time of callback functions from custom plugins and themes is captured.
No errors should be generated.
*/

Expand All @@ -34,11 +34,11 @@ functions from wordpress core, custom plugins and themes is captured.
Framework/WordPress/Plugin/mock-plugin2
Framework/WordPress/Plugin/mock-theme1
Framework/WordPress/Plugin/mock-theme2
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_METRICS_DONT_EXIST
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_ERROR_EVENTS null */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
- detect WordPress framework
- name the web transaction as an 'Action' named after the template used to generate the page
- detect custom plugins and themes
- generate hooks metrics for all callback functions executions; the execution time of callback
functions from wordpress core, custom plugins and themes is captured.
- generate hooks metrics only for plugins and themes callback functions executions;
only the execution time of callback functions from custom plugins and themes is captured.
No errors should be generated.
*/

Expand All @@ -34,11 +34,11 @@ functions from wordpress core, custom plugins and themes is captured.
Framework/WordPress/Plugin/mock-plugin2
Framework/WordPress/Plugin/mock-theme1
Framework/WordPress/Plugin/mock-theme2
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_METRICS_DONT_EXIST
Framework/WordPress/Hook/wp_init
Framework/WordPress/Hook/the_content
*/

/*EXPECT_ERROR_EVENTS null */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
The agent should properly instrument Wordpress apply_filters hooks. Since the
mocked hooks are detected by the agent as WordPress core (plugin_from_function
returns NULL), and WordPress core callbacks are not instrumented by default,
therefore newrelic.framework.wordpress.core needs to be set to true for the
agent to generate the hooks metrics.
therefore newrelic.framework.wordpress.hooks.options needs to be set to
"all_callbacks" for the agent to generate the hooks metrics.
*/

/*SKIPIF
Expand All @@ -18,7 +18,7 @@
/*INI
newrelic.framework = wordpress
newrelic.framework.wordpress.hooks_threshold = 0
newrelic.framework.wordpress.core = true
newrelic.framework.wordpress.hooks.options = all_callbacks
*/

/*EXPECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@
The agent should properly instrument Wordpress do_action hooks. Since the
mocked hooks are detected by the agent as WordPress core (plugin_from_function
returns NULL), and WordPress core callbacks are not instrumented by default,
therefore newrelic.framework.wordpress.core needs to be set to true for the
agent to generate the hooks metrics.
therefore newrelic.framework.wordpress.hooks.options needs to be set to
"all_callbacks" for the agent to generate the hooks metrics.
*/

/*SKIPIF
*/

/*INI
newrelic.framework = wordpress
newrelic.framework.wordpress.hooks_threshold = 0
newrelic.framework.wordpress.core = true
newrelic.framework.wordpress.hooks.options = all_callbacks
*/

/*EXPECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@
metric should be generated and the hook function should be instrumented.
However, since the mocked hooks are detected by the agent as WordPress core
(plugin_from_function returns NULL), and WordPress core callbacks are not
instrumented by default, therefore newrelic.framework.wordpress.core needs
to be set to true for the agent to generate the hooks metrics.
instrumented by default, therefore therefore newrelic.framework.wordpress.hooks.options
needs to be set to "all_callbacks" for the agent to generate the hooks metrics.
*/

/*SKIPIF*/

/*INI
newrelic.framework = wordpress
newrelic.framework.wordpress.hooks = true
newrelic.framework.wordpress.hooks_threshold = 0
newrelic.framework.wordpress.core = true
newrelic.framework.wordpress.hooks.options = all_callbacks
*/

/*ENVIRONMENT
Expand Down

0 comments on commit 30747ff

Please sign in to comment.