Skip to content

Commit fa4626a

Browse files
committed
chore: improve test
1 parent 09ed3cc commit fa4626a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test-ajax.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public function test_ajax_response_get_query_data_valid_query() {
4444

4545
$_POST['params'] = array(
4646
'query' => 'SELECT * FROM wp_posts',
47+
'chart_id' => 1,
4748
);
4849
try {
4950
// Trigger the AJAX action
@@ -69,6 +70,7 @@ public function test_ajax_response_get_query_data_invalid_query() {
6970

7071
$_POST['params'] = array(
7172
'query' => "/**/UPDATE wp_options SET option_value='administrator' WHERE option_name='default_role' --",
73+
'chart_id' => 1,
7274
);
7375
try {
7476
// Trigger the AJAX action
@@ -95,6 +97,7 @@ public function test_ajax_response_get_query_data_subcriber_dissallow() {
9597

9698
$_POST['params'] = array(
9799
'query' => "/**/UPDATE wp_options SET option_value='administrator' WHERE option_name='default_role' --",
100+
'chart_id' => 1,
98101
);
99102
try {
100103
// Trigger the AJAX action

0 commit comments

Comments
 (0)