L337xyz
Server: LiteSpeed
System: Linux in-mum-web831.main-hosting.eu 4.18.0-553.34.1.lve.el8.x86_64 #1 SMP Thu Jan 9 16:30:32 UTC 2025 x86_64
User: u786315844 (786315844)
PHP: 7.4.33
Disabled: system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/.wp-cli/packages/vendor/wp-cli/extension-command/features/plugin-toggle.feature
Feature: Toggle the activation status of a plugin

  Background:
    Given a WP install

  Scenario: Toggle the status of a plugin
    When I run `wp plugin toggle akismet`
    Then STDOUT should be:
      """
      Plugin 'akismet' activated.
      Success: Toggled 1 of 1 plugins.
      """

    When I run `wp plugin toggle akismet`
    Then STDOUT should be:
      """
      Plugin 'akismet' deactivated.
      Success: Toggled 1 of 1 plugins.
      """

  Scenario: Toggling the status of a plugin that doesn't exist
    When I try `wp plugin toggle akismet debug-bar`
    Then STDERR should be:
      """
      Warning: The 'debug-bar' plugin could not be found.
      Error: Only toggled 1 of 2 plugins.
      """
    And STDOUT should be:
      """
      Plugin 'akismet' activated.
      """
    And the return code should be 1

    When I try `wp plugin toggle debug-bar co-authors-plus`
    Then STDERR should be:
      """
      Warning: The 'debug-bar' plugin could not be found.
      Warning: The 'co-authors-plus' plugin could not be found.
      Error: No plugins toggled.
      """
    And STDOUT should be empty
    And the return code should be 1