Skip to content

Commit f5f9c7a

Browse files
fix: update nonce creation for import tests
1 parent 826d97e commit f5f9c7a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test-import.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function test_url_import( $url, $content, $series ) {
8989
'remote_data' => $url,
9090
);
9191
$_GET = array(
92-
'nonce' => wp_create_nonce(),
92+
'nonce' => wp_create_nonce( 'visualizer-upload-data' ),
9393
'chart' => $this->chart,
9494
);
9595
// swallow the output
@@ -163,7 +163,7 @@ public function test_file_import( $file, $content, $series ) {
163163
),
164164
);
165165
$_GET = array(
166-
'nonce' => wp_create_nonce(),
166+
'nonce' => wp_create_nonce( 'visualizer-upload-data' ),
167167
'chart' => $this->chart,
168168
);
169169
// swallow the output

tests/test-revisions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function test_chart_edit_cancel( $file_orig, $file_new ) {
7979
),
8080
);
8181
$_GET = array(
82-
'nonce' => wp_create_nonce(),
82+
'nonce' => wp_create_nonce( 'visualizer-upload-data' ),
8383
'chart' => $this->chart,
8484
'tab' => 'type',
8585
);
@@ -151,7 +151,7 @@ public function test_chart_edit_again( $file_orig, $file_new ) {
151151
),
152152
);
153153
$_GET = array(
154-
'nonce' => wp_create_nonce(),
154+
'nonce' => wp_create_nonce( 'visualizer-upload-data' ),
155155
'chart' => $this->chart,
156156
'tab' => 'type',
157157
);
@@ -218,7 +218,7 @@ public function test_chart_edit_save( $file_orig, $file_new ) {
218218
),
219219
);
220220
$_GET = array(
221-
'nonce' => wp_create_nonce(),
221+
'nonce' => wp_create_nonce( 'visualizer-upload-data' ),
222222
'chart' => $this->chart,
223223
'tab' => 'type',
224224
);

0 commit comments

Comments
 (0)