Add basic unit tests for is_plugin_active_for_network()
Props rodrigosprimo Fixes #30491 git-svn-id: https://develop.svn.wordpress.org/trunk@30559 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c2c0eee75a
commit
f1e5edee9a
@ -133,6 +133,16 @@ class Tests_Multisite_Network extends WP_UnitTestCase {
|
||||
remove_action( 'activate_' . $path, array ( $mock, 'action' ) );
|
||||
}
|
||||
|
||||
function test_is_plugin_active_for_network_true() {
|
||||
activate_plugin( 'hello.php', '', true );
|
||||
$this->assertTrue( is_plugin_active_for_network( 'hello.php' ) );
|
||||
}
|
||||
|
||||
function test_is_plugin_active_for_network_false() {
|
||||
deactivate_plugins( 'hello.php', false, true );
|
||||
$this->assertFalse( is_plugin_active_for_network( 'hello.php' ) );
|
||||
}
|
||||
|
||||
function _helper_deactivate_hook() {
|
||||
$this->plugin_hook_count++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user