Skip to content

Commit

Permalink
Add a test for the settings fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Apr 27, 2020
1 parent 128f934 commit 4ff7821
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/php/WidgetContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ public function testLegacyInstance() {
);
}

public function testSettingsUrl() {
WP_Mock::userFunction(
'admin_url',
array(
'args' => array(
WP_Mock\Functions::type( 'string' ),
),
'times' => 1,
)
);

$this->plugin->plugin_settings_admin_url();
}

public function testRequestPathResolver() {
$this->assertEquals(
'path-to-a/url.html?true=2',
Expand Down

0 comments on commit 4ff7821

Please sign in to comment.