public function test_deactivatePlugin() { $this->assertFalse($this->manager->isPluginActivated('ExampleTheme')); $this->manager->activatePlugin('ExampleTheme'); $this->assertTrue($this->manager->isPluginActivated('ExampleTheme')); $this->manager->deactivatePlugin('ExampleTheme'); $this->assertFalse($this->manager->isPluginActivated('ExampleTheme')); }
public function deactivate($redirectAfter = true) { $pluginName = $this->initPluginModification(static::DEACTIVATE_NONCE); $this->dieIfPluginsAdminIsDisabled(); $this->pluginManager->deactivatePlugin($pluginName); $this->redirectAfterModification($redirectAfter); }