Skip to content

Commit af3b810

Browse files
committed
Update testRefreshForms to assert Creator Profile and Creator Network forms are not returned
1 parent 84ba5ae commit af3b810

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/wpunit/ResourceTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,16 @@ public function testRefreshForms()
284284
$this->assertEquals('AAA Test', reset($result)[ $this->resource->order_by ]);
285285
$this->assertEquals('WooCommerce Product Form', end($result)[ $this->resource->order_by ]);
286286

287+
// Assert that any Creator Network or Creator Profile form is not included in the resultset.
288+
foreach ( $result as $formID => $form) {
289+
if ( array_key_exists('format', $form)) {
290+
$this->assertNotNull($form['format']);
291+
}
292+
293+
$this->assertNotEquals($form['name'], 'Creator Network');
294+
$this->assertNotEquals($form['name'], 'Creator Profile');
295+
}
296+
287297
// Confirm resources stored in WordPress options.
288298
$resources = get_option($this->resource->settings_name);
289299

0 commit comments

Comments
 (0)