WinterTest

Console command to run tests for plugins and modules.

 class System\Console\WinterTest
extends Illuminate\Console\Command

If a plugin is provided, this command will search for a phpunit.xml file inside the plugin's directory and run its tests.

Extends

Properties

protected static $defaultName : string | null

The default command name for lazy loading.

protected $description : string

The console command description.

protected $name : string

The console command name.

protected $phpUnitExec : ?string

Path to phpunit binary

protected $signature : string

The console command signature as ignoreValidationErrors causes options not to be registered.

Methods

public __construct () : void

Create a new command instance.

Returns
void

public handle () : int | void

Execute the console command.

Returns
int | void

protected execPhpUnit (string $config, array $args) : integer

Execute a phpunit test

Parameters
Property Description
$config
string

Path to configuration file

$args
array

Array of params for PHPUnit

Returns
integer

Exit code from process

protected getPhpUnitConfigs () : array

Find all PHPUnit config files (core, lib, plugins)

Returns
array

protected getPhpUnitXmlFile (string $path) : string | null

Search for the config file to use.

Priority order is: phpunit.xml, phpunit.xml.dist

Parameters
Property Description
$path
string
Returns
string | null

protected usingPest () : bool

Determines if Pest is being used.

Returns
bool
Copyright © 2024 Winter CMS