Make WordPress Core

Ticket #30491: 30491.diff

File 30491.diff, 806 bytes (added by rodrigosprimo, 10 years ago)
  • tests/phpunit/tests/multisite/network.php

    diff --git a/tests/phpunit/tests/multisite/network.php b/tests/phpunit/tests/multisite/network.php
    index 5b424ca..058f411 100644
    a b class Tests_Multisite_Network extends WP_UnitTestCase { 
    133133                remove_action( 'activate_' . $path, array ( $mock, 'action' ) );
    134134        }
    135135
     136        function test_is_plugin_active_for_network_true() {
     137                activate_plugin( 'hello.php', '', true );
     138                $this->assertTrue( is_plugin_active_for_network( 'hello.php' ) );
     139        }
     140
     141        function test_is_plugin_active_for_network_false() {
     142                deactivate_plugins( 'hello.php', false, true );
     143                $this->assertFalse( is_plugin_active_for_network( 'hello.php' ) );
     144        }
     145
    136146        function _helper_deactivate_hook() {
    137147                $this->plugin_hook_count++;
    138148        }