Make WordPress Core

Ticket #30489: 30489.diff

File 30489.diff, 969 bytes (added by voldemortensen, 10 years ago)
  • tests/phpunit/tests/admin/includesPlugin.php

     
    5656
    5757                wp_set_current_user( $current_user );
    5858        }
     59
     60        function test_is_plugin_active_true() {
     61                activate_plugin( 'hello.php' );
     62                $test = is_plugin_active( 'hello.php' );
     63                $this->assertTrue( $test );
     64        }
     65
     66        function test_is_plugin_active_false() {
     67                deactivate_plugins( 'hello.php' );
     68                $test = is_plugin_active( 'hello.php' );
     69                $this->assertFalse( $test );
     70        }
     71
     72        function test_is_plugin_inactive_true() {
     73                deactivate_plugins( 'hello.php' );
     74                $test = is_plugin_inactive( 'hello.php' );
     75                $this->assertTrue( $test );
     76        }
     77
     78        function test_is_plugin_inactive_false() {
     79                activate_plugin( 'hello.php' );
     80                $test = is_plugin_inactive( 'hello.php' );
     81                $this->assertFalse( $test );
     82        }
    5983}