From e29c5f66aedf428725f8fd9d86d7f96f4a7f9de3 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Wed, 22 Feb 2023 12:11:30 +0000 Subject: [PATCH 1/4] Add WP CLI helper for codeception --- docs/testing-with-codeception.md | 24 +- tests/_support/Helper/WPCLI.php | 79 + .../_generated/AcceptanceTesterActions.php | 2440 +++-------------- 3 files changed, 552 insertions(+), 1991 deletions(-) create mode 100644 tests/_support/Helper/WPCLI.php diff --git a/docs/testing-with-codeception.md b/docs/testing-with-codeception.md index 65dad2b..9774e94 100644 --- a/docs/testing-with-codeception.md +++ b/docs/testing-with-codeception.md @@ -592,7 +592,29 @@ This module is typically used in acceptance and functional tests to invoke WP-CL ### Altis helpers -Altis extends Codeception/wp-browser with its own helpers. Check out the `tests/_helpers` directory within the `dev-tools` package to check out existing helpers and new available functionality. +Altis extends Codeception with its own helpers. These can be found in the `tests/_support/Helper` directory within the `vendor/altis/dev-tools` package. + +All helpers are under the `Helper` namespace. + +#### `Helper\WPCLI` + +This helper provides a way to run WP CLI commands using the PHP Server's built in WP CLI package. This means you do not need to install any additional command packages to use them, and is useful if you are not testing CLI commands specifically but need to run a background cron task during a test for example. The following methods to the `$I` class: + +- `$I->wpCli( string $command )`: Run any WP CLI command, minus the `wp` +- `$I->grabLastWpCliShellOutput()`: Retrieve the output from the previous call to `$I->wpCli()` +- `$I->grabLastWpCliExitCode()`: Retrieve the exit code from the previous call to `$I->wpCli()` +- `$I->wpCliToString( string $command )`: Run a command and return the output as a string +- `$I->wpCliToArray( string $command )`: Run a command and return the output as an array, split on newlines. + +To use the helper, update your suite's YAML configuration, for example: + +```yml +actor: AcceptanceTester +modules: + enabled: + - WPBrowser + - \Helper\WPCLI +``` ## Scaffolding diff --git a/tests/_support/Helper/WPCLI.php b/tests/_support/Helper/WPCLI.php new file mode 100644 index 0000000..1802cc6 --- /dev/null +++ b/tests/_support/Helper/WPCLI.php @@ -0,0 +1,79 @@ +shell_output, $this->shell_exit_code ); + // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.system_calls_exec + exec( sprintf( + 'WPBROWSER_HOST_REQUEST=1 wp --url=%s %s', + getenv( 'TEST_SITE_WP_DOMAIN' ), + $command + ), $this->shell_output, $this->shell_exit_code ); + } + + /** + * Use the full WP CLI to run a command and get the output. + * + * @param string $command Command to run minus 'wp'. + * @return string + */ + public function wpCliToString( string $command = '' ) : string { + $this->wpCli( $command ); + return implode( "\n", (array) $this->shell_output ); + } + + /** + * Use the full WP CLI to run a command and get the output as an array. + * + * @param string $command Command to run minus 'wp'. + * @return array + */ + public function wpCliToArray( string $command = '' ) : array { + $this->wpCli( $command ); + return (array) $this->shell_output; + } + + /** + * Return the last exit code from WP CLI. + * + * @return integer + */ + public function grabLastWpCliExitCode() : int { + return (int) $this->shell_exit_code; + } + + /** + * Return the last output from WP CLI. + * + * @return string + */ + public function grabLastWpCliShellOutput() : string { + return implode( "\n", (array) $this->shell_output ); + } +} diff --git a/tests/_support/_generated/AcceptanceTesterActions.php b/tests/_support/_generated/AcceptanceTesterActions.php index b4d4738..14159b7 100644 --- a/tests/_support/_generated/AcceptanceTesterActions.php +++ b/tests/_support/_generated/AcceptanceTesterActions.php @@ -1,4 +1,4 @@ -cli(['plugin', 'activate', 'my-plugin']); + * // Change a user password. + * $I->cli(['user', 'update', 'luca', '--user_pass=newpassword']); + * ``` + *@param array $env Additional environment per process. + * + * @param bool $inherit_env Indicate if the current test process env should be passed to the cli + * command. Env variables passed from the yaml configuration are still + * inherited if set to false. Env variables passed from + * $I->haveInShellEnvironment() are still inherited if set to + * `false`. + * @param string|array $userCommand The string of command and parameters as it would be passed to wp-cli + * minus `wp`. + * For back-compatibility purposes you can still pass the commandline as a + * string, but the array format is the preferred and supported method. + * + * @return int|string The command exit value; `0` usually means success. + * + * + * @throws ModuleConfigException If a required wp-cli file cannot be found or the WordPress path does not exist + * at runtime. + * + * @throws ModuleException If the status evaluates to non-zero and the `throw` configuration + * parameter is set to `true`. + * @see \Codeception\Module\WPCLI::cli() + */ + public function cli($userCommand = "core version", array $env = [], $inherit_env = true) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('cli', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Adds a set of environment variables to the set of environment variables that will be passed to the + * next wp-cli commands + * + * @param array $env_vars Environment variables that are added to all commands. + * + * @return void + * @see \Codeception\Module\WPCLI::haveInShellEnvironment() + */ + public function haveInShellEnvironment(array $env_vars) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('haveInShellEnvironment', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Removes a set of environment variables from the set of environment variables that will be passed to the + * next wp-cli commands. + * + * @note PHP7.1+ only + * + * @param string[] $blocked_env_var_names Environment variables names that are not inherited from the (global) + * runner shell. + * + * @return void + * @see \Codeception\Module\WPCLI::dontInheritShellEnvironment() + */ + public function dontInheritShellEnvironment(array $blocked_env_var_names) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('dontInheritShellEnvironment', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Returns the shell output of the last command. + * + * @return string The output produced by the last shell command, if any. + * + * @throws ModuleException If no prior command ran. + * @see \Codeception\Module\WPCLI::grabLastShellOutput() + */ + public function grabLastShellOutput() { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastShellOutput', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Returns the output of a wp-cli command as an array optionally allowing a callback to process the output. + * + * @example + * ```php + * // Return a list of inactive themes, like ['twentyfourteen', 'twentyfifteen']. + * $inactiveThemes = $I->cliToArray(['theme', 'list', '--status=inactive', '--field=name']); + * // Get the list of installed plugins and only keep the ones starting with "foo". + * $fooPlugins = $I->cliToArray(['plugin', 'list', '--field=name'], function($output){ + * return array_filter(explode(PHP_EOL, $output), function($name){ + * return strpos(trim($name), 'foo') === 0; + * }); + * }); + * ``` + * @param callable $splitCallback An optional callback function to split the results array. + * @param array $env Additional environment per process. + * @param bool $inherit_env Whether to inherit the environment variables from the parent process. + * + * @param string|array $userCommand The string of command and parameters as it would be passed to wp-cli + * minus `wp`. For back-compatibility purposes you can still pass the + * commandline as a string, but the array format is the preferred and + * supported method. + * @return array An array containing the output of wp-cli split into single elements. + * + * @throws ModuleConfigException If the path to the WordPress installation does not exist. + * + * @throws \Codeception\Exception\ModuleException If the $splitCallback function does not return an array. + * @see \Codeception\Module\WPCLI::cliToArray() + */ + public function cliToArray($userCommand = "post list --format=ids", ?callable $splitCallback = NULL, array $env = [], $inherit_env = true) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('cliToArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Returns the output of a wp-cli command as a string. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $adminEmail = $I->cliToString('option get admin_email'); + * // Get the list of active plugins in JSON format, two ways. + * $activePlugins = $I->cliToString(['plugin', 'list','--status=active', '--format=json']); + * $activePlugins = $I->cliToString(['option', 'get', 'active_plugins' ,'--format=json']); + * ``` + * @param array $env Additional environment per process. + * + * @param string|array $userCommand The string of command and parameters as it would be passed to wp-cli + * minus `wp`. + * For back-compatibility purposes you can still pass the commandline as a + * string, but the array format is the preferred and supported method. + * @param bool $inherit_env Whether to inherit the environment variables from the current process. + * + * @return int|string The command output, if any. + * + * @throws ModuleException If there's an exception while running the command and the module is configured to throw. + * + * @throws ModuleConfigException If the path to the WordPress installation does not exist. + * @see \Codeception\Module\WPCLI::cliToString() + */ + public function cliToString($userCommand, array $env = [], $inherit_env = true) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('cliToString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that output from last command contains text. + * + * @param string $text The text to assert is in the output. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('option get admin_email'); + * $I->seeInShellOutput('admin@example.org'); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeInShellOutput() + */ + public function seeInShellOutput($text) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInShellOutput', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks that output from last command contains text. + * + * @param string $text The text to assert is in the output. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('option get admin_email'); + * $I->seeInShellOutput('admin@example.org'); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeInShellOutput() + */ + public function canSeeInShellOutput($text) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInShellOutput', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that output from last command doesn't contain text. + * + * @param string $text The text to assert is not in the output. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('plugin list --status=active'); + * $I->dontSeeInShellOutput('my-inactive/plugin.php'); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::dontSeeInShellOutput() + */ + public function dontSeeInShellOutput($text) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInShellOutput', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks that output from last command doesn't contain text. + * + * @param string $text The text to assert is not in the output. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('plugin list --status=active'); + * $I->dontSeeInShellOutput('my-inactive/plugin.php'); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::dontSeeInShellOutput() + */ + public function cantSeeInShellOutput($text) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInShellOutput', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks that output from the last command matches a given regular expression. + * + * @param string $regex The regex pattern, including delimiters, to assert the output matches against. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('option get admin_email'); + * $I->seeShellOutputMatches('/^\S+@\S+$/'); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeShellOutputMatches() + */ + public function seeShellOutputMatches($regex) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeShellOutputMatches', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks that output from the last command matches a given regular expression. + * + * @param string $regex The regex pattern, including delimiters, to assert the output matches against. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('option get admin_email'); + * $I->seeShellOutputMatches('/^\S+@\S+$/'); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeShellOutputMatches() + */ + public function canSeeShellOutputMatches($regex) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeShellOutputMatches', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks the result code from the last command. + * + * @param int $code The desired result code. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('option get admin_email'); + * $I->seeResultCodeIs(0); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeResultCodeIs() + */ + public function seeResultCodeIs($code) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResultCodeIs', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks the result code from the last command. + * + * @param int $code The desired result code. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('option get admin_email'); + * $I->seeResultCodeIs(0); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeResultCodeIs() + */ + public function canSeeResultCodeIs($code) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResultCodeIs', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Checks the result code from the last command. + * + * @param int $code The result code the command should not have exited with. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('invalid command'); + * $I->seeResultCodeIsNot(0); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeResultCodeIsNot() + */ + public function seeResultCodeIsNot($code) { + return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResultCodeIsNot', func_get_args())); + } + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * [!] Conditional Assertion: Test won't be stopped on fail + * Checks the result code from the last command. + * + * @param int $code The result code the command should not have exited with. + * + * @example + * ```php + * // Return the current site administrator email, using string command format. + * $I->cli('invalid command'); + * $I->seeResultCodeIsNot(0); + * ``` + * + * @return void + * @see \Codeception\Module\WPCLI::seeResultCodeIsNot() + */ + public function canSeeResultCodeIsNot($code) { + return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResultCodeIsNot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Builds the full command to run including the PHP binary and the wp-cli boot file path. + * + * @param array|string $command The command to run. + * + * @return array The full command including the current PHP binary and the absolute path to the wp-cli boot + * file. + * + * @throws WpCliException If there's an issue building the command. + * + * @example + * ```php + * // This method is defined in the WithWpCli trait. + * // Set the wp-cli path, `$this` is a test case. + * $this->setUpWpCli( '/var/www/html' ); + * // Builds the full wp-cli command, including the `path` variable. + * $fullCommand = $this->buildFullCommand(['core', 'version']); + * // The full command can then be used to run it with another process handler. + * $wpCliProcess = new Process($fullCommand); + * $wpCliProcess->run(); + * ``` + * @see \Codeception\Module\WPCLI::buildFullCommand() + */ + public function buildFullCommand($command) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('buildFullCommand', func_get_args())); + } + + /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -8233,2035 +8636,92 @@ public function amEditingPostWithId($id) { /** * [!] Method is generated. Documentation taken from corresponding module. * - * Handles and checks exception called inside callback function. - * Either exception class name or exception instance should be provided. + * Go to the admin page to edit the user with the specified ID. * - * ```php - * expectException(MyException::class, function() { - * $this->doSomethingBad(); - * }); + * The method will **not** handle authentication the admin area. * - * $I->expectException(new MyException(), function() { - * $this->doSomethingBad(); - * }); - * ``` - * If you want to check message or exception code, you can pass them with exception instance: + * @example * ```php - * expectException(new MyException("Don't do bad things"), function() { - * $this->doSomethingBad(); - * }); + * $I->loginAsAdmin(); + * $userId = $I->haveUserInDatabase('luca', 'editor'); + * $I->amEditingUserWithId($userId); + * $I->fillField('email', 'new@example.net'); * ``` * - * @deprecated Use expectThrowable() instead - * @param \Exception|string $exception - * @param callable $callback - * @see \Codeception\Module\Asserts::expectException() + * @param int $id The user ID. + * + * @return void + * @see \Codeception\Module\WPWebDriver::amEditingUserWithId() */ - public function expectException($exception, $callback) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args())); + public function amEditingUserWithId($id) { + return $this->getScenario()->runStep(new \Codeception\Step\Condition('amEditingUserWithId', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Handles and checks throwables (Exceptions/Errors) called inside the callback function. - * Either throwable class name or throwable instance should be provided. - * - * ```php - * expectThrowable(MyThrowable::class, function() { - * $this->doSomethingBad(); - * }); - * - * $I->expectThrowable(new MyException(), function() { - * $this->doSomethingBad(); - * }); - * ``` - * If you want to check message or throwable code, you can pass them with throwable instance: - * ```php - * expectThrowable(new MyError("Don't do bad things"), function() { - * $this->doSomethingBad(); - * }); - * ``` - * - * @param \Throwable|string $throwable - * @param callable $callback - * @see \Codeception\Module\Asserts::expectThrowable() + * Use the full WP CLI to run a command. + * + * @param string $command Command to run minus 'wp'. + * @return void + * @see \Helper\WPCLI::wpCli() */ - public function expectThrowable($throwable, $callback) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); + public function wpCli(string $command = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('wpCli', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Asserts that a file does not exist. - * - * @param string $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() + * Use the full WP CLI to run a command and get the output. + * + * @param string $command Command to run minus 'wp'. + * @return string + * @see \Helper\WPCLI::wpCliToString() */ - public function assertFileNotExists($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); + public function wpCliToString(string $command = ""): string { + return $this->getScenario()->runStep(new \Codeception\Step\Action('wpCliToString', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Asserts that a value is greater than or equal to another value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() + * Use the full WP CLI to run a command and get the output as an array. + * + * @param string $command Command to run minus 'wp'. + * @return array + * @see \Helper\WPCLI::wpCliToArray() */ - public function assertGreaterOrEquals($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); + public function wpCliToArray(string $command = ""): array { + return $this->getScenario()->runStep(new \Codeception\Step\Action('wpCliToArray', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Asserts that a variable is empty. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() + * Return the last exit code from WP CLI. + * + * @return integer + * @see \Helper\WPCLI::grabLastWpCliExitCode() */ - public function assertIsEmpty($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); + public function grabLastWpCliExitCode(): int { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastWpCliExitCode', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Asserts that a value is smaller than or equal to another value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() - */ - public function assertLessOrEquals($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string does not match a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() - */ - public function assertNotRegExp($pattern, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string matches a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertRegExp() - */ - public function assertRegExp($pattern, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @param $value - * @param Constraint $constraint - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() - */ - public function assertThatItsNot($value, $constraint, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that an array has a specified key. - * - * @param int|string $key - * @param array|ArrayAccess $array - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() - */ - public function assertArrayHasKey($key, $array, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that an array does not have a specified key. - * - * @param int|string $key - * @param array|ArrayAccess $array - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() - */ - public function assertArrayNotHasKey($key, $array, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a class has a specified attribute. - * - * @param string $attributeName - * @param string $className - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() - */ - public function assertClassHasAttribute($attributeName, $className, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a class has a specified static attribute. - * - * @param string $attributeName - * @param string $className - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() - */ - public function assertClassHasStaticAttribute($attributeName, $className, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a class does not have a specified attribute. - * - * @param string $attributeName - * @param string $className - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() - */ - public function assertClassNotHasAttribute($attributeName, $className, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a class does not have a specified static attribute. - * - * @param string $attributeName - * @param string $className - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() - */ - public function assertClassNotHasStaticAttribute($attributeName, $className, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a haystack contains a needle. - * - * @param $needle - * @param $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertContains() - */ - public function assertContains($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @param $needle - * @param $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() - */ - public function assertContainsEquals($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a haystack contains only values of a given type. - * - * @param string $type - * @param $haystack - * @param bool|null $isNativeType - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() - */ - public function assertContainsOnly($type, $haystack, $isNativeType = NULL, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a haystack contains only instances of a given class name. - * - * @param string $className - * @param $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() - */ - public function assertContainsOnlyInstancesOf($className, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param int $expectedCount - * @param Countable|iterable $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertCount() - */ - public function assertCount($expectedCount, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a directory does not exist. - * - * @param string $directory - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() - */ - public function assertDirectoryDoesNotExist($directory, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a directory exists. - * - * @param string $directory - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() - */ - public function assertDirectoryExists($directory, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a directory exists and is not readable. - * - * @param string $directory - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() - */ - public function assertDirectoryIsNotReadable($directory, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a directory exists and is not writable. - * - * @param string $directory - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() - */ - public function assertDirectoryIsNotWritable($directory, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a directory exists and is readable. - * - * @param string $directory - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() - */ - public function assertDirectoryIsReadable($directory, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a directory exists and is writable. - * - * @param string $directory - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() - */ - public function assertDirectoryIsWritable($directory, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string does not match a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() - */ - public function assertDoesNotMatchRegularExpression($pattern, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is empty. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertEmpty() - */ - public function assertEmpty($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are equal. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertEquals() - */ - public function assertEquals($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are equal (canonicalizing). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() - */ - public function assertEqualsCanonicalizing($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are equal (ignoring case). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() - */ - public function assertEqualsIgnoringCase($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are equal (with delta). - * - * @param $expected - * @param $actual - * @param float $delta - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() - */ - public function assertEqualsWithDelta($expected, $actual, $delta, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a condition is false. - * - * @param $condition - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFalse() - */ - public function assertFalse($condition, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file does not exist. - * - * @param string $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() - */ - public function assertFileDoesNotExist($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of one file is equal to the contents of another file. - * - * @param string $expected - * @param string $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileEquals() - */ - public function assertFileEquals($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() - */ - public function assertFileEqualsCanonicalizing($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of one file is equal to the contents of another file (ignoring case). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() - */ - public function assertFileEqualsIgnoringCase($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file exists. - * - * @param string $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileExists() - */ - public function assertFileExists($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file exists and is not readable. - * - * @param string $file - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() - */ - public function assertFileIsNotReadable($file, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file exists and is not writable. - * - * @param string $file - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() - */ - public function assertFileIsNotWritable($file, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file exists and is readable. - * - * @param string $file - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() - */ - public function assertFileIsReadable($file, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file exists and is writable. - * - * @param string $file - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() - */ - public function assertFileIsWritable($file, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of one file is not equal to the contents of another file. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() - */ - public function assertFileNotEquals($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() - */ - public function assertFileNotEqualsCanonicalizing($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() - */ - public function assertFileNotEqualsIgnoringCase($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is finite. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertFinite() - */ - public function assertFinite($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a value is greater than another value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() - */ - public function assertGreaterThan($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a value is greater than or equal to another value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() - */ - public function assertGreaterThanOrEqual($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is infinite. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertInfinite() - */ - public function assertInfinite($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of a given type. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() - */ - public function assertInstanceOf($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type array. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsArray() - */ - public function assertIsArray($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type bool. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsBool() - */ - public function assertIsBool($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type callable. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsCallable() - */ - public function assertIsCallable($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type resource and is closed. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() - */ - public function assertIsClosedResource($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type float. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsFloat() - */ - public function assertIsFloat($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type int. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsInt() - */ - public function assertIsInt($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type iterable. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsIterable() - */ - public function assertIsIterable($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type array. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() - */ - public function assertIsNotArray($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type bool. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() - */ - public function assertIsNotBool($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type callable. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() - */ - public function assertIsNotCallable($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type resource. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() - */ - public function assertIsNotClosedResource($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type float. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() - */ - public function assertIsNotFloat($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type int. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() - */ - public function assertIsNotInt($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type iterable. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() - */ - public function assertIsNotIterable($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type numeric. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() - */ - public function assertIsNotNumeric($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type object. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() - */ - public function assertIsNotObject($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file/dir exists and is not readable. - * - * @param string $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() - */ - public function assertIsNotReadable($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type resource. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() - */ - public function assertIsNotResource($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type scalar. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() - */ - public function assertIsNotScalar($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of type string. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotString() - */ - public function assertIsNotString($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file/dir exists and is not writable. - * - * @param $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() - */ - public function assertIsNotWritable($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type numeric. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() - */ - public function assertIsNumeric($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type object. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsObject() - */ - public function assertIsObject($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file/dir is readable. - * - * @param $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsReadable() - */ - public function assertIsReadable($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type resource. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsResource() - */ - public function assertIsResource($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type scalar. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsScalar() - */ - public function assertIsScalar($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is of type string. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsString() - */ - public function assertIsString($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a file/dir exists and is writable. - * - * @param $filename - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertIsWritable() - */ - public function assertIsWritable($filename, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string is a valid JSON string. - * - * @param string $actualJson - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJson() - */ - public function assertJson($actualJson, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two JSON files are equal. - * - * @param string $expectedFile - * @param string $actualFile - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() - */ - public function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two JSON files are not equal. - * - * @param string $expectedFile - * @param string $actualFile - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() - */ - public function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the generated JSON encoded object and the content of the given file are equal. - * - * @param string $expectedFile - * @param string $actualJson - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() - */ - public function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two given JSON encoded objects or arrays are equal. - * - * @param string $expectedJson - * @param string $actualJson - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() - */ - public function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the generated JSON encoded object and the content of the given file are not equal. - * - * @param string $expectedFile - * @param string $actualJson - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() - */ - public function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two given JSON encoded objects or arrays are not equal. - * - * @param string $expectedJson - * @param string $actualJson - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() - */ - public function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a value is smaller than another value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertLessThan() - */ - public function assertLessThan($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a value is smaller than or equal to another value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() - */ - public function assertLessThanOrEqual($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string matches a given regular expression. - * - * @param string $pattern - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() - */ - public function assertMatchesRegularExpression($pattern, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is nan. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNan() - */ - public function assertNan($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a haystack does not contain a needle. - * - * @param $needle - * @param $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotContains() - */ - public function assertNotContains($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * - * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() - */ - public function assertNotContainsEquals($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a haystack does not contain only values of a given type. - * - * @param string $type - * @param $haystack - * @param bool|null $isNativeType - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() - */ - public function assertNotContainsOnly($type, $haystack, $isNativeType = NULL, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts the number of elements of an array, Countable or Traversable. - * - * @param int $expectedCount - * @param Countable|iterable $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotCount() - */ - public function assertNotCount($expectedCount, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not empty. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() - */ - public function assertNotEmpty($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are not equal. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotEquals() - */ - public function assertNotEquals($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are not equal (canonicalizing). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() - */ - public function assertNotEqualsCanonicalizing($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are not equal (ignoring case). - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() - */ - public function assertNotEqualsIgnoringCase($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables are not equal (with delta). - * - * @param $expected - * @param $actual - * @param float $delta - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() - */ - public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a condition is not false. - * - * @param $condition - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotFalse() - */ - public function assertNotFalse($condition, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not of a given type. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() - */ - public function assertNotInstanceOf($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is not null. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotNull() - */ - public function assertNotNull($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables do not have the same type and value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotSame() - */ - public function assertNotSame($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() - */ - public function assertNotSameSize($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a condition is not true. - * - * @param $condition - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNotTrue() - */ - public function assertNotTrue($condition, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a variable is null. - * - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertNull() - */ - public function assertNull($actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that an object has a specified attribute. - * - * @param string $attributeName - * @param object $object - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() - */ - public function assertObjectHasAttribute($attributeName, $object, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that an object does not have a specified attribute. - * - * @param string $attributeName - * @param object $object - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() - */ - public function assertObjectNotHasAttribute($attributeName, $object, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two variables have the same type and value. - * - * @param $expected - * @param $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertSame() - */ - public function assertSame($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. - * - * @param Countable|iterable $expected - * @param Countable|iterable $actual - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertSameSize() - */ - public function assertSameSize($expected, $actual, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @param string $needle - * @param string $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() - */ - public function assertStringContainsString($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * - * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() - */ - public function assertStringContainsStringIgnoringCase($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string ends not with a given suffix. - * - * @param string $suffix - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() - */ - public function assertStringEndsNotWith($suffix, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string ends with a given suffix. - * - * @param string $suffix - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() - */ - public function assertStringEndsWith($suffix, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of a string is equal to the contents of a file. - * - * @param string $expectedFile - * @param string $actualString - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() - */ - public function assertStringEqualsFile($expectedFile, $actualString, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). - * - * @param string $expectedFile - * @param string $actualString - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() - */ - public function assertStringEqualsFileCanonicalizing($expectedFile, $actualString, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of a string is equal to the contents of a file (ignoring case). - * - * @param string $expectedFile - * @param string $actualString - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() - */ - public function assertStringEqualsFileIgnoringCase($expectedFile, $actualString, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string matches a given format string. - * - * @param string $format - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() - */ - public function assertStringMatchesFormat($format, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string matches a given format file. - * - * @param string $formatFile - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() - */ - public function assertStringMatchesFormatFile($formatFile, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @param string $needle - * @param string $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() - */ - public function assertStringNotContainsString($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * @param string $needle - * @param string $haystack - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() - */ - public function assertStringNotContainsStringIgnoringCase($needle, $haystack, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of a string is not equal to the contents of a file. - * - * @param string $expectedFile - * @param string $actualString - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() - */ - public function assertStringNotEqualsFile($expectedFile, $actualString, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). - * @param string $expectedFile - * @param string $actualString - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() - */ - public function assertStringNotEqualsFileCanonicalizing($expectedFile, $actualString, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). - * - * @param string $expectedFile - * @param string $actualString - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() - */ - public function assertStringNotEqualsFileIgnoringCase($expectedFile, $actualString, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string does not match a given format string. - * - * @param string $format - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() - */ - public function assertStringNotMatchesFormat($format, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string does not match a given format string. - * - * @param string $formatFile - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() - */ - public function assertStringNotMatchesFormatFile($formatFile, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string starts not with a given prefix. - * - * @param string $prefix - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() - */ - public function assertStringStartsNotWith($prefix, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a string starts with a given prefix. - * - * @param string $prefix - * @param string $string - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() - */ - public function assertStringStartsWith($prefix, $string, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Evaluates a PHPUnit\Framework\Constraint matcher object. - * - * @param $value - * @param Constraint $constraint - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertThat() - */ - public function assertThat($value, $constraint, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that a condition is true. - * - * @param $condition - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertTrue() - */ - public function assertTrue($condition, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two XML files are equal. - * - * @param string $expectedFile - * @param string $actualFile - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() - */ - public function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two XML files are not equal. - * - * @param string $expectedFile - * @param string $actualFile - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() - */ - public function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two XML documents are equal. - * - * @param string $expectedFile - * @param DOMDocument|string $actualXml - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() - */ - public function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two XML documents are equal. - * - * @param DOMDocument|string $expectedXml - * @param DOMDocument|string $actualXml - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() - */ - public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two XML documents are not equal. - * - * @param string $expectedFile - * @param DOMDocument|string $actualXml - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() - */ - public function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Asserts that two XML documents are not equal. - * - * @param DOMDocument|string $expectedXml - * @param DOMDocument|string $actualXml - * @param string $message - * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() - */ - public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Fails a test with the given message. - * - * @param string $message - * @see \Codeception\Module\AbstractAsserts::fail() - */ - public function fail($message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Mark the test as incomplete. - * - * @param string $message - * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() - */ - public function markTestIncomplete($message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Mark the test as skipped. - * - * @param string $message - * @see \Codeception\Module\AbstractAsserts::markTestSkipped() + * Return the last output from WP CLI. + * + * @return string + * @see \Helper\WPCLI::grabLastWpCliShellOutput() */ - public function markTestSkipped($message = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); + public function grabLastWpCliShellOutput(): string { + return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastWpCliShellOutput', func_get_args())); } } From 9be7e1461c041e15a358c1de3d6f64bf3586f333 Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Wed, 22 Feb 2023 12:16:26 +0000 Subject: [PATCH 2/4] Fix formatting --- tests/_support/Helper/WPCLI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/_support/Helper/WPCLI.php b/tests/_support/Helper/WPCLI.php index 1802cc6..84aade0 100644 --- a/tests/_support/Helper/WPCLI.php +++ b/tests/_support/Helper/WPCLI.php @@ -28,7 +28,7 @@ class WPCLI extends \Codeception\Module * @return void */ public function wpCli( string $command = '' ) { - unset( $this->shell_output, $this->shell_exit_code ); + unset( $this->shell_output, $this->shell_exit_code ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.system_calls_exec exec( sprintf( 'WPBROWSER_HOST_REQUEST=1 wp --url=%s %s', From 0a68e4a32820ea2f5145060bfdad78b0d21c630e Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Wed, 22 Feb 2023 13:02:06 +0000 Subject: [PATCH 3/4] Readd AT actions file, deleted by mistake --- .../_generated/AcceptanceTesterActions.php | 2440 ++++++++++++++--- 1 file changed, 1990 insertions(+), 450 deletions(-) diff --git a/tests/_support/_generated/AcceptanceTesterActions.php b/tests/_support/_generated/AcceptanceTesterActions.php index 14159b7..b4d4738 100644 --- a/tests/_support/_generated/AcceptanceTesterActions.php +++ b/tests/_support/_generated/AcceptanceTesterActions.php @@ -1,4 +1,4 @@ -cli(['plugin', 'activate', 'my-plugin']); - * // Change a user password. - * $I->cli(['user', 'update', 'luca', '--user_pass=newpassword']); - * ``` - *@param array $env Additional environment per process. - * - * @param bool $inherit_env Indicate if the current test process env should be passed to the cli - * command. Env variables passed from the yaml configuration are still - * inherited if set to false. Env variables passed from - * $I->haveInShellEnvironment() are still inherited if set to - * `false`. - * @param string|array $userCommand The string of command and parameters as it would be passed to wp-cli - * minus `wp`. - * For back-compatibility purposes you can still pass the commandline as a - * string, but the array format is the preferred and supported method. - * - * @return int|string The command exit value; `0` usually means success. - * - * - * @throws ModuleConfigException If a required wp-cli file cannot be found or the WordPress path does not exist - * at runtime. - * - * @throws ModuleException If the status evaluates to non-zero and the `throw` configuration - * parameter is set to `true`. - * @see \Codeception\Module\WPCLI::cli() - */ - public function cli($userCommand = "core version", array $env = [], $inherit_env = true) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('cli', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Adds a set of environment variables to the set of environment variables that will be passed to the - * next wp-cli commands - * - * @param array $env_vars Environment variables that are added to all commands. - * - * @return void - * @see \Codeception\Module\WPCLI::haveInShellEnvironment() - */ - public function haveInShellEnvironment(array $env_vars) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('haveInShellEnvironment', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Removes a set of environment variables from the set of environment variables that will be passed to the - * next wp-cli commands. - * - * @note PHP7.1+ only - * - * @param string[] $blocked_env_var_names Environment variables names that are not inherited from the (global) - * runner shell. - * - * @return void - * @see \Codeception\Module\WPCLI::dontInheritShellEnvironment() - */ - public function dontInheritShellEnvironment(array $blocked_env_var_names) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('dontInheritShellEnvironment', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Returns the shell output of the last command. - * - * @return string The output produced by the last shell command, if any. - * - * @throws ModuleException If no prior command ran. - * @see \Codeception\Module\WPCLI::grabLastShellOutput() - */ - public function grabLastShellOutput() { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastShellOutput', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Returns the output of a wp-cli command as an array optionally allowing a callback to process the output. - * - * @example - * ```php - * // Return a list of inactive themes, like ['twentyfourteen', 'twentyfifteen']. - * $inactiveThemes = $I->cliToArray(['theme', 'list', '--status=inactive', '--field=name']); - * // Get the list of installed plugins and only keep the ones starting with "foo". - * $fooPlugins = $I->cliToArray(['plugin', 'list', '--field=name'], function($output){ - * return array_filter(explode(PHP_EOL, $output), function($name){ - * return strpos(trim($name), 'foo') === 0; - * }); - * }); - * ``` - * @param callable $splitCallback An optional callback function to split the results array. - * @param array $env Additional environment per process. - * @param bool $inherit_env Whether to inherit the environment variables from the parent process. - * - * @param string|array $userCommand The string of command and parameters as it would be passed to wp-cli - * minus `wp`. For back-compatibility purposes you can still pass the - * commandline as a string, but the array format is the preferred and - * supported method. - * @return array An array containing the output of wp-cli split into single elements. - * - * @throws ModuleConfigException If the path to the WordPress installation does not exist. - * - * @throws \Codeception\Exception\ModuleException If the $splitCallback function does not return an array. - * @see \Codeception\Module\WPCLI::cliToArray() - */ - public function cliToArray($userCommand = "post list --format=ids", ?callable $splitCallback = NULL, array $env = [], $inherit_env = true) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('cliToArray', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Returns the output of a wp-cli command as a string. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $adminEmail = $I->cliToString('option get admin_email'); - * // Get the list of active plugins in JSON format, two ways. - * $activePlugins = $I->cliToString(['plugin', 'list','--status=active', '--format=json']); - * $activePlugins = $I->cliToString(['option', 'get', 'active_plugins' ,'--format=json']); - * ``` - * @param array $env Additional environment per process. - * - * @param string|array $userCommand The string of command and parameters as it would be passed to wp-cli - * minus `wp`. - * For back-compatibility purposes you can still pass the commandline as a - * string, but the array format is the preferred and supported method. - * @param bool $inherit_env Whether to inherit the environment variables from the current process. - * - * @return int|string The command output, if any. - * - * @throws ModuleException If there's an exception while running the command and the module is configured to throw. - * - * @throws ModuleConfigException If the path to the WordPress installation does not exist. - * @see \Codeception\Module\WPCLI::cliToString() - */ - public function cliToString($userCommand, array $env = [], $inherit_env = true) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('cliToString', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that output from last command contains text. - * - * @param string $text The text to assert is in the output. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('option get admin_email'); - * $I->seeInShellOutput('admin@example.org'); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeInShellOutput() - */ - public function seeInShellOutput($text) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeInShellOutput', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * [!] Conditional Assertion: Test won't be stopped on fail - * Checks that output from last command contains text. - * - * @param string $text The text to assert is in the output. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('option get admin_email'); - * $I->seeInShellOutput('admin@example.org'); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeInShellOutput() - */ - public function canSeeInShellOutput($text) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeInShellOutput', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that output from last command doesn't contain text. - * - * @param string $text The text to assert is not in the output. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('plugin list --status=active'); - * $I->dontSeeInShellOutput('my-inactive/plugin.php'); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::dontSeeInShellOutput() - */ - public function dontSeeInShellOutput($text) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('dontSeeInShellOutput', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * [!] Conditional Assertion: Test won't be stopped on fail - * Checks that output from last command doesn't contain text. - * - * @param string $text The text to assert is not in the output. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('plugin list --status=active'); - * $I->dontSeeInShellOutput('my-inactive/plugin.php'); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::dontSeeInShellOutput() - */ - public function cantSeeInShellOutput($text) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('dontSeeInShellOutput', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks that output from the last command matches a given regular expression. - * - * @param string $regex The regex pattern, including delimiters, to assert the output matches against. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('option get admin_email'); - * $I->seeShellOutputMatches('/^\S+@\S+$/'); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeShellOutputMatches() - */ - public function seeShellOutputMatches($regex) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeShellOutputMatches', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * [!] Conditional Assertion: Test won't be stopped on fail - * Checks that output from the last command matches a given regular expression. - * - * @param string $regex The regex pattern, including delimiters, to assert the output matches against. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('option get admin_email'); - * $I->seeShellOutputMatches('/^\S+@\S+$/'); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeShellOutputMatches() - */ - public function canSeeShellOutputMatches($regex) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeShellOutputMatches', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks the result code from the last command. - * - * @param int $code The desired result code. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('option get admin_email'); - * $I->seeResultCodeIs(0); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeResultCodeIs() - */ - public function seeResultCodeIs($code) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResultCodeIs', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * [!] Conditional Assertion: Test won't be stopped on fail - * Checks the result code from the last command. - * - * @param int $code The desired result code. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('option get admin_email'); - * $I->seeResultCodeIs(0); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeResultCodeIs() - */ - public function canSeeResultCodeIs($code) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResultCodeIs', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Checks the result code from the last command. - * - * @param int $code The result code the command should not have exited with. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('invalid command'); - * $I->seeResultCodeIsNot(0); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeResultCodeIsNot() - */ - public function seeResultCodeIsNot($code) { - return $this->getScenario()->runStep(new \Codeception\Step\Assertion('seeResultCodeIsNot', func_get_args())); - } - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * [!] Conditional Assertion: Test won't be stopped on fail - * Checks the result code from the last command. - * - * @param int $code The result code the command should not have exited with. - * - * @example - * ```php - * // Return the current site administrator email, using string command format. - * $I->cli('invalid command'); - * $I->seeResultCodeIsNot(0); - * ``` - * - * @return void - * @see \Codeception\Module\WPCLI::seeResultCodeIsNot() - */ - public function canSeeResultCodeIsNot($code) { - return $this->getScenario()->runStep(new \Codeception\Step\ConditionalAssertion('seeResultCodeIsNot', func_get_args())); - } - - - /** - * [!] Method is generated. Documentation taken from corresponding module. - * - * Builds the full command to run including the PHP binary and the wp-cli boot file path. - * - * @param array|string $command The command to run. - * - * @return array The full command including the current PHP binary and the absolute path to the wp-cli boot - * file. - * - * @throws WpCliException If there's an issue building the command. - * - * @example - * ```php - * // This method is defined in the WithWpCli trait. - * // Set the wp-cli path, `$this` is a test case. - * $this->setUpWpCli( '/var/www/html' ); - * // Builds the full wp-cli command, including the `path` variable. - * $fullCommand = $this->buildFullCommand(['core', 'version']); - * // The full command can then be used to run it with another process handler. - * $wpCliProcess = new Process($fullCommand); - * $wpCliProcess->run(); - * ``` - * @see \Codeception\Module\WPCLI::buildFullCommand() - */ - public function buildFullCommand($command) { - return $this->getScenario()->runStep(new \Codeception\Step\Action('buildFullCommand', func_get_args())); - } - - /** * [!] Method is generated. Documentation taken from corresponding module. * @@ -8636,92 +8233,2035 @@ public function amEditingPostWithId($id) { /** * [!] Method is generated. Documentation taken from corresponding module. * - * Go to the admin page to edit the user with the specified ID. + * Handles and checks exception called inside callback function. + * Either exception class name or exception instance should be provided. * - * The method will **not** handle authentication the admin area. + * ```php + * expectException(MyException::class, function() { + * $this->doSomethingBad(); + * }); * - * @example + * $I->expectException(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * If you want to check message or exception code, you can pass them with exception instance: * ```php - * $I->loginAsAdmin(); - * $userId = $I->haveUserInDatabase('luca', 'editor'); - * $I->amEditingUserWithId($userId); - * $I->fillField('email', 'new@example.net'); + * expectException(new MyException("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); * ``` * - * @param int $id The user ID. - * - * @return void - * @see \Codeception\Module\WPWebDriver::amEditingUserWithId() + * @deprecated Use expectThrowable() instead + * @param \Exception|string $exception + * @param callable $callback + * @see \Codeception\Module\Asserts::expectException() */ - public function amEditingUserWithId($id) { - return $this->getScenario()->runStep(new \Codeception\Step\Condition('amEditingUserWithId', func_get_args())); + public function expectException($exception, $callback) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('expectException', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Use the full WP CLI to run a command. - * - * @param string $command Command to run minus 'wp'. - * @return void - * @see \Helper\WPCLI::wpCli() + * Handles and checks throwables (Exceptions/Errors) called inside the callback function. + * Either throwable class name or throwable instance should be provided. + * + * ```php + * expectThrowable(MyThrowable::class, function() { + * $this->doSomethingBad(); + * }); + * + * $I->expectThrowable(new MyException(), function() { + * $this->doSomethingBad(); + * }); + * ``` + * If you want to check message or throwable code, you can pass them with throwable instance: + * ```php + * expectThrowable(new MyError("Don't do bad things"), function() { + * $this->doSomethingBad(); + * }); + * ``` + * + * @param \Throwable|string $throwable + * @param callable $callback + * @see \Codeception\Module\Asserts::expectThrowable() */ - public function wpCli(string $command = "") { - return $this->getScenario()->runStep(new \Codeception\Step\Action('wpCli', func_get_args())); + public function expectThrowable($throwable, $callback) { + return $this->getScenario()->runStep(new \Codeception\Step\Action('expectThrowable', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Use the full WP CLI to run a command and get the output. - * - * @param string $command Command to run minus 'wp'. - * @return string - * @see \Helper\WPCLI::wpCliToString() + * Asserts that a file does not exist. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotExists() */ - public function wpCliToString(string $command = ""): string { - return $this->getScenario()->runStep(new \Codeception\Step\Action('wpCliToString', func_get_args())); + public function assertFileNotExists($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotExists', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Use the full WP CLI to run a command and get the output as an array. - * - * @param string $command Command to run minus 'wp'. - * @return array - * @see \Helper\WPCLI::wpCliToArray() + * Asserts that a value is greater than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertGreaterOrEquals() */ - public function wpCliToArray(string $command = ""): array { - return $this->getScenario()->runStep(new \Codeception\Step\Action('wpCliToArray', func_get_args())); + public function assertGreaterOrEquals($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterOrEquals', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Return the last exit code from WP CLI. - * - * @return integer - * @see \Helper\WPCLI::grabLastWpCliExitCode() + * Asserts that a variable is empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsEmpty() */ - public function grabLastWpCliExitCode(): int { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastWpCliExitCode', func_get_args())); + public function assertIsEmpty($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsEmpty', func_get_args())); } /** * [!] Method is generated. Documentation taken from corresponding module. * - * Return the last output from WP CLI. - * - * @return string - * @see \Helper\WPCLI::grabLastWpCliShellOutput() + * Asserts that a value is smaller than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertLessOrEquals() + */ + public function assertLessOrEquals($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessOrEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotRegExp() + */ + public function assertNotRegExp($pattern, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertRegExp() + */ + public function assertRegExp($pattern, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertRegExp', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param $value + * @param Constraint $constraint + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertThatItsNot() + */ + public function assertThatItsNot($value, $constraint, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThatItsNot', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array has a specified key. + * + * @param int|string $key + * @param array|ArrayAccess $array + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertArrayHasKey() + */ + public function assertArrayHasKey($key, $array, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an array does not have a specified key. + * + * @param int|string $key + * @param array|ArrayAccess $array + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertArrayNotHasKey() + */ + public function assertArrayNotHasKey($key, $array, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertArrayNotHasKey', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassHasAttribute() + */ + public function assertClassHasAttribute($attributeName, $className, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class has a specified static attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassHasStaticAttribute() + */ + public function assertClassHasStaticAttribute($attributeName, $className, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasAttribute() + */ + public function assertClassNotHasAttribute($attributeName, $className, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a class does not have a specified static attribute. + * + * @param string $attributeName + * @param string $className + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertClassNotHasStaticAttribute() + */ + public function assertClassNotHasStaticAttribute($attributeName, $className, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertClassNotHasStaticAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains a needle. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContains() + */ + public function assertContains($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContainsEquals() + */ + public function assertContainsEquals($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only values of a given type. + * + * @param string $type + * @param $haystack + * @param bool|null $isNativeType + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContainsOnly() + */ + public function assertContainsOnly($type, $haystack, $isNativeType = NULL, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack contains only instances of a given class name. + * + * @param string $className + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertContainsOnlyInstancesOf() + */ + public function assertContainsOnlyInstancesOf($className, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertContainsOnlyInstancesOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param int $expectedCount + * @param Countable|iterable $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertCount() + */ + public function assertCount($expectedCount, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory does not exist. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryDoesNotExist() + */ + public function assertDirectoryDoesNotExist($directory, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryExists() + */ + public function assertDirectoryExists($directory, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not readable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotReadable() + */ + public function assertDirectoryIsNotReadable($directory, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is not writable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsNotWritable() + */ + public function assertDirectoryIsNotWritable($directory, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is readable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsReadable() + */ + public function assertDirectoryIsReadable($directory, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a directory exists and is writable. + * + * @param string $directory + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDirectoryIsWritable() + */ + public function assertDirectoryIsWritable($directory, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDirectoryIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertDoesNotMatchRegularExpression() + */ + public function assertDoesNotMatchRegularExpression($pattern, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertDoesNotMatchRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEmpty() + */ + public function assertEmpty($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEquals() + */ + public function assertEquals($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEqualsCanonicalizing() + */ + public function assertEqualsCanonicalizing($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEqualsIgnoringCase() + */ + public function assertEqualsIgnoringCase($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are equal (with delta). + * + * @param $expected + * @param $actual + * @param float $delta + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertEqualsWithDelta() + */ + public function assertEqualsWithDelta($expected, $actual, $delta, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is false. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFalse() + */ + public function assertFalse($condition, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file does not exist. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileDoesNotExist() + */ + public function assertFileDoesNotExist($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileDoesNotExist', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file. + * + * @param string $expected + * @param string $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileEquals() + */ + public function assertFileEquals($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsCanonicalizing() + */ + public function assertFileEqualsCanonicalizing($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is equal to the contents of another file (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileEqualsIgnoringCase() + */ + public function assertFileEqualsIgnoringCase($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileExists() + */ + public function assertFileExists($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileExists', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not readable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotReadable() + */ + public function assertFileIsNotReadable($file, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is not writable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsNotWritable() + */ + public function assertFileIsNotWritable($file, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is readable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsReadable() + */ + public function assertFileIsReadable($file, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file exists and is writable. + * + * @param string $file + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileIsWritable() + */ + public function assertFileIsWritable($file, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotEquals() + */ + public function assertFileNotEquals($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsCanonicalizing() + */ + public function assertFileNotEqualsCanonicalizing($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of one file is not equal to the contents of another file (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFileNotEqualsIgnoringCase() + */ + public function assertFileNotEqualsIgnoringCase($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFileNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is finite. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertFinite() + */ + public function assertFinite($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertFinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertGreaterThan() + */ + public function assertGreaterThan($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is greater than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertGreaterThanOrEqual() + */ + public function assertGreaterThanOrEqual($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is infinite. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertInfinite() + */ + public function assertInfinite($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInfinite', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of a given type. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertInstanceOf() + */ + public function assertInstanceOf($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type array. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsArray() + */ + public function assertIsArray($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type bool. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsBool() + */ + public function assertIsBool($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type callable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsCallable() + */ + public function assertIsCallable($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource and is closed. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsClosedResource() + */ + public function assertIsClosedResource($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type float. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsFloat() + */ + public function assertIsFloat($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type int. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsInt() + */ + public function assertIsInt($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type iterable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsIterable() + */ + public function assertIsIterable($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type array. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotArray() + */ + public function assertIsNotArray($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotArray', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type bool. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotBool() + */ + public function assertIsNotBool($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotBool', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type callable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotCallable() + */ + public function assertIsNotCallable($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotCallable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotClosedResource() + */ + public function assertIsNotClosedResource($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotClosedResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type float. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotFloat() + */ + public function assertIsNotFloat($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotFloat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type int. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotInt() + */ + public function assertIsNotInt($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotInt', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type iterable. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotIterable() + */ + public function assertIsNotIterable($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotIterable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type numeric. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotNumeric() + */ + public function assertIsNotNumeric($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type object. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotObject() + */ + public function assertIsNotObject($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not readable. + * + * @param string $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotReadable() + */ + public function assertIsNotReadable($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type resource. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotResource() + */ + public function assertIsNotResource($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type scalar. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotScalar() + */ + public function assertIsNotScalar($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of type string. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotString() + */ + public function assertIsNotString($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is not writable. + * + * @param $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNotWritable() + */ + public function assertIsNotWritable($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNotWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type numeric. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsNumeric() + */ + public function assertIsNumeric($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsNumeric', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type object. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsObject() + */ + public function assertIsObject($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsObject', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir is readable. + * + * @param $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsReadable() + */ + public function assertIsReadable($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsReadable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type resource. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsResource() + */ + public function assertIsResource($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsResource', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type scalar. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsScalar() + */ + public function assertIsScalar($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsScalar', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is of type string. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsString() + */ + public function assertIsString($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a file/dir exists and is writable. + * + * @param $filename + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertIsWritable() + */ + public function assertIsWritable($filename, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertIsWritable', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string is a valid JSON string. + * + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJson() + */ + public function assertJson($actualJson, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJson', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonFileEqualsJsonFile() + */ + public function assertJsonFileEqualsJsonFile($expectedFile, $actualFile, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two JSON files are not equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonFileNotEqualsJsonFile() + */ + public function assertJsonFileNotEqualsJsonFile($expectedFile, $actualFile, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonFileNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are equal. + * + * @param string $expectedFile + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonFile() + */ + public function assertJsonStringEqualsJsonFile($expectedFile, $actualJson, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are equal. + * + * @param string $expectedJson + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringEqualsJsonString() + */ + public function assertJsonStringEqualsJsonString($expectedJson, $actualJson, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the generated JSON encoded object and the content of the given file are not equal. + * + * @param string $expectedFile + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonFile() + */ + public function assertJsonStringNotEqualsJsonFile($expectedFile, $actualJson, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two given JSON encoded objects or arrays are not equal. + * + * @param string $expectedJson + * @param string $actualJson + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertJsonStringNotEqualsJsonString() + */ + public function assertJsonStringNotEqualsJsonString($expectedJson, $actualJson, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertJsonStringNotEqualsJsonString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertLessThan() + */ + public function assertLessThan($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a value is smaller than or equal to another value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertLessThanOrEqual() + */ + public function assertLessThanOrEqual($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertLessThanOrEqual', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given regular expression. + * + * @param string $pattern + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertMatchesRegularExpression() + */ + public function assertMatchesRegularExpression($pattern, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertMatchesRegularExpression', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is nan. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNan() + */ + public function assertNan($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNan', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain a needle. + * + * @param $needle + * @param $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotContains() + */ + public function assertNotContains($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContains', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertNotContainsEquals() + */ + public function assertNotContainsEquals($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a haystack does not contain only values of a given type. + * + * @param string $type + * @param $haystack + * @param bool|null $isNativeType + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotContainsOnly() + */ + public function assertNotContainsOnly($type, $haystack, $isNativeType = NULL, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotContainsOnly', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts the number of elements of an array, Countable or Traversable. + * + * @param int $expectedCount + * @param Countable|iterable $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotCount() + */ + public function assertNotCount($expectedCount, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotCount', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not empty. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEmpty() + */ + public function assertNotEmpty($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEmpty', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEquals() + */ + public function assertNotEquals($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEquals', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (canonicalizing). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsCanonicalizing() + */ + public function assertNotEqualsCanonicalizing($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (ignoring case). + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsIgnoringCase() + */ + public function assertNotEqualsIgnoringCase($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables are not equal (with delta). + * + * @param $expected + * @param $actual + * @param float $delta + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotEqualsWithDelta() + */ + public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotEqualsWithDelta', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not false. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotFalse() + */ + public function assertNotFalse($condition, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotFalse', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not of a given type. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotInstanceOf() + */ + public function assertNotInstanceOf($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotInstanceOf', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is not null. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotNull() + */ + public function assertNotNull($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables do not have the same type and value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotSame() + */ + public function assertNotSame($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is not the same. + * + * @param Countable|iterable $expected + * @param Countable|iterable $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotSameSize() + */ + public function assertNotSameSize($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is not true. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNotTrue() + */ + public function assertNotTrue($condition, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNotTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a variable is null. + * + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertNull() + */ + public function assertNull($actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertNull', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object has a specified attribute. + * + * @param string $attributeName + * @param object $object + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertObjectHasAttribute() + */ + public function assertObjectHasAttribute($attributeName, $object, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that an object does not have a specified attribute. + * + * @param string $attributeName + * @param object $object + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertObjectNotHasAttribute() + */ + public function assertObjectNotHasAttribute($attributeName, $object, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertObjectNotHasAttribute', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two variables have the same type and value. + * + * @param $expected + * @param $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertSame() + */ + public function assertSame($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSame', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same. + * + * @param Countable|iterable $expected + * @param Countable|iterable $actual + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertSameSize() + */ + public function assertSameSize($expected, $actual, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertSameSize', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param string $needle + * @param string $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringContainsString() + */ + public function assertStringContainsString($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * + * @see \Codeception\Module\AbstractAsserts::assertStringContainsStringIgnoringCase() + */ + public function assertStringContainsStringIgnoringCase($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends not with a given suffix. + * + * @param string $suffix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEndsNotWith() + */ + public function assertStringEndsNotWith($suffix, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string ends with a given suffix. + * + * @param string $suffix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEndsWith() + */ + public function assertStringEndsWith($suffix, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEndsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file. + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFile() + */ + public function assertStringEqualsFile($expectedFile, $actualString, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (canonicalizing). + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileCanonicalizing() + */ + public function assertStringEqualsFileCanonicalizing($expectedFile, $actualString, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is equal to the contents of a file (ignoring case). + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringEqualsFileIgnoringCase() + */ + public function assertStringEqualsFileIgnoringCase($expectedFile, $actualString, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format string. + * + * @param string $format + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormat() + */ + public function assertStringMatchesFormat($format, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string matches a given format file. + * + * @param string $formatFile + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringMatchesFormatFile() + */ + public function assertStringMatchesFormatFile($formatFile, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param string $needle + * @param string $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsString() + */ + public function assertStringNotContainsString($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * @param string $needle + * @param string $haystack + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotContainsStringIgnoringCase() + */ + public function assertStringNotContainsStringIgnoringCase($needle, $haystack, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotContainsStringIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file. + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFile() + */ + public function assertStringNotEqualsFile($expectedFile, $actualString, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (canonicalizing). + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileCanonicalizing() + */ + public function assertStringNotEqualsFileCanonicalizing($expectedFile, $actualString, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileCanonicalizing', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that the contents of a string is not equal to the contents of a file (ignoring case). + * + * @param string $expectedFile + * @param string $actualString + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotEqualsFileIgnoringCase() + */ + public function assertStringNotEqualsFileIgnoringCase($expectedFile, $actualString, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotEqualsFileIgnoringCase', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * + * @param string $format + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormat() + */ + public function assertStringNotMatchesFormat($format, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string does not match a given format string. + * + * @param string $formatFile + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringNotMatchesFormatFile() + */ + public function assertStringNotMatchesFormatFile($formatFile, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringNotMatchesFormatFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts not with a given prefix. + * + * @param string $prefix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringStartsNotWith() + */ + public function assertStringStartsNotWith($prefix, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsNotWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a string starts with a given prefix. + * + * @param string $prefix + * @param string $string + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertStringStartsWith() + */ + public function assertStringStartsWith($prefix, $string, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertStringStartsWith', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Evaluates a PHPUnit\Framework\Constraint matcher object. + * + * @param $value + * @param Constraint $constraint + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertThat() + */ + public function assertThat($value, $constraint, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertThat', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that a condition is true. + * + * @param $condition + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertTrue() + */ + public function assertTrue($condition, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertTrue', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlFileEqualsXmlFile() + */ + public function assertXmlFileEqualsXmlFile($expectedFile, $actualFile, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML files are not equal. + * + * @param string $expectedFile + * @param string $actualFile + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlFileNotEqualsXmlFile() + */ + public function assertXmlFileNotEqualsXmlFile($expectedFile, $actualFile, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlFileNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param string $expectedFile + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlFile() + */ + public function assertXmlStringEqualsXmlFile($expectedFile, $actualXml, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are equal. + * + * @param DOMDocument|string $expectedXml + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringEqualsXmlString() + */ + public function assertXmlStringEqualsXmlString($expectedXml, $actualXml, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param string $expectedFile + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlFile() + */ + public function assertXmlStringNotEqualsXmlFile($expectedFile, $actualXml, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlFile', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Asserts that two XML documents are not equal. + * + * @param DOMDocument|string $expectedXml + * @param DOMDocument|string $actualXml + * @param string $message + * @see \Codeception\Module\AbstractAsserts::assertXmlStringNotEqualsXmlString() + */ + public function assertXmlStringNotEqualsXmlString($expectedXml, $actualXml, $message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('assertXmlStringNotEqualsXmlString', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Fails a test with the given message. + * + * @param string $message + * @see \Codeception\Module\AbstractAsserts::fail() + */ + public function fail($message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('fail', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as incomplete. + * + * @param string $message + * @see \Codeception\Module\AbstractAsserts::markTestIncomplete() + */ + public function markTestIncomplete($message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestIncomplete', func_get_args())); + } + + + /** + * [!] Method is generated. Documentation taken from corresponding module. + * + * Mark the test as skipped. + * + * @param string $message + * @see \Codeception\Module\AbstractAsserts::markTestSkipped() */ - public function grabLastWpCliShellOutput(): string { - return $this->getScenario()->runStep(new \Codeception\Step\Action('grabLastWpCliShellOutput', func_get_args())); + public function markTestSkipped($message = "") { + return $this->getScenario()->runStep(new \Codeception\Step\Action('markTestSkipped', func_get_args())); } } From d686239a7c7882c1f27d4279a40d01ddc177a23b Mon Sep 17 00:00:00 2001 From: Robert O'Rourke Date: Thu, 23 Feb 2023 10:27:25 +0000 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Ryan McCue --- docs/testing-with-codeception.md | 2 +- tests/_support/Helper/WPCLI.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/testing-with-codeception.md b/docs/testing-with-codeception.md index 9774e94..f71085b 100644 --- a/docs/testing-with-codeception.md +++ b/docs/testing-with-codeception.md @@ -594,7 +594,7 @@ This module is typically used in acceptance and functional tests to invoke WP-CL Altis extends Codeception with its own helpers. These can be found in the `tests/_support/Helper` directory within the `vendor/altis/dev-tools` package. -All helpers are under the `Helper` namespace. +All helpers are under the `\Helper` namespace. #### `Helper\WPCLI` diff --git a/tests/_support/Helper/WPCLI.php b/tests/_support/Helper/WPCLI.php index 84aade0..a12fb68 100644 --- a/tests/_support/Helper/WPCLI.php +++ b/tests/_support/Helper/WPCLI.php @@ -4,8 +4,9 @@ // here you can define custom actions // all public methods declared in helper class will be available in $I -class WPCLI extends \Codeception\Module -{ +use \Codeception\Module; + +class WPCLI extends Module { /** * Previous shell output.