Testing utils for snicco/better-wp-cli
This package provides a CommandTester class that allows testing CLI-commands
created with snicco/better-wp-cli without having
to run the entire wp runner from end-to-end.
composer require snicco/better-wp-cli-testinguse Snicco\Component\BetterWPCLI\Testing\CommandTester;
$tester = new CommandTester(new CreateUserCommand());
$tester->run(['calvin', '[email protected]'], ['send-email' => true]);
$tester->assertCommandIsSuccessful();
$tester->assertStatusCode(0);
$tester->seeInStdout('User created!');
$tester->dontSeeInStderr('Fail');This repository is a read-only split of the development repo of the Snicco project.
This is how you can contribute.
Please report issues in the Snicco monorepo.
If you discover a security vulnerability, please follow our disclosure procedure.