403Webshell
Server IP : 162.241.219.206  /  Your IP : 216.73.216.30
Web Server : Apache
System : Linux box5669.bluehost.com 5.14.0-687.15.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 11 08:51:45 EDT 2026 x86_64
User : signavd5 ( 2863)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /opt/wp-cli-plugins/vendor/wp-cli/doctor-command/features/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/wp-cli-plugins/vendor/wp-cli/doctor-command/features/check.feature
Feature: Basic check usage

  Scenario: Use --spotlight to focus on warnings and errors
    Given a WP install
    And I run `wp plugin activate --all`
    And I run `wp plugin update --all`

    When I run `wp doctor list --format=count`
    Then save STDOUT as {CHECK_COUNT}

    When I run `wp doctor check --all --spotlight`
    Then STDOUT should be:
      """
      Success: All {CHECK_COUNT} checks report 'success'.
      """

    When I run `wp doctor check plugin-deactivated --spotlight`
    Then STDOUT should be:
      """
      Success: The check reports 'success'.
      """

    When I run `wp doctor check --all --spotlight --format=json`
    Then STDOUT should be:
      """
      []
      """

  Scenario: Error when no checks nor --all are provided
    Given a WP install

    When I try `wp doctor check`
    Then STDERR should be:
      """
      Error: Please specify one or more checks, or use --all.
      """
    And the return code should be 1

  Scenario: Error when an invalid check is provided.
    Given a WP install
    And a config.yml file:
      """
      """

    When I try `wp doctor check invalid-check`
    Then STDERR should be:
      """
      Error: Invalid check.
      """
    And the return code should be 1

    When I try `wp doctor check invalid-check invalid-check2`
    Then STDERR should be:
      """
      Error: Invalid checks.
      """
    And the return code should be 1

    When I try `wp doctor check --all --config=config.yml`
    Then STDERR should be:
      """
      Error: No checks registered.
      """
    And the return code should be 1

  Scenario: List all default checks
    Given a WP install

    When I run `wp doctor list --fields=name`
    Then STDOUT should be a table containing rows:
      | name                  |
      | autoload-options-size |
      | core-update           |
      | core-verify-checksums |
      | plugin-deactivated    |
      | plugin-update         |
      | theme-update          |

  Scenario: Discard redirects emitted by WordPress
    Given a WP install
    And a wp-content/mu-plugins/redirect.php file:
      """
      <?php
      add_action( 'template_redirect', function(){
        wp_redirect( 'http://google.com' );
        exit;
      });
      """

    When I run `wp doctor check autoload-options-size --fields=name,status`
    Then STDERR should contain:
      """
      Warning: Incomplete check execution. Some code is trying to do a URL redirect. Backtrace:
      """
    And STDOUT should be a table containing rows:
      | name                   | status             |
      | autoload-options-size  | success            |

Youez - 2016 - github.com/yon3zu
LinuXploit