Strata\Shell\Command\TestCommand
Starts the project's test suite.
Intended use is <code>bin/strata test</code>
Synopsis
class TestCommand
extends StrataCommandBase
{
- // Inherited members from StrataCommandBase
- protected string $tree_line;
- protected string $tree_end;
- public InputInterface $input;
- public OutputInterface $output;
- // methods
- protected void configure()
- protected void execute()
- protected string getPhpunitBin()
- protected string preparePhpunitArguments()
- private boolean hasBootstrapFile()
- protected string getBootstrapFile()
- // Inherited methods from StrataCommandBase
- public static mixed factory()
- public static string generateClassPath()
- public string tree()
- public string ok()
- public string skip()
- public string fail()
- public string nl()
- public null startup()
- public null shutdown()
- protected void configure()
- protected null|int execute()
Hierarchy
Members
protected
-
$tree_end
—
string
The bottom part of a tree representation prefix. -
$tree_line
—
string
A tree representation prefix.
public
-
$input
—
Symfony\Component\Console\Input\InputInterface
A reference to the current input interface object -
$output
—
Symfony\Component\Console\Output\OutputInterface
A reference to the current output interface object
Methods
private
- hasBootstrapFile() — Confirms the presence of a phpunit bootstrap file
protected
- configure() — {@inheritdoc}
- execute() — {@inheritdoc}
- getBootstrapFile() — Returns the path to where phpunit's bootstrap file should be.
- getPhpunitBin() — Returns the path to the phpunit binary
- preparePhpunitArguments() — Prepares the arguments that can be sent to phpunit
Inherited from Strata\Shell\Command\StrataCommandBase
protected
- configure() — Configures the current command.
- execute() — Executes the current command.
public
- factory()
- fail() — Creates a visual representation of a failed status. This is useful when performing an action that can be skipped or succeed.
- generateClassPath() — Generates a possible namespace and classname combination of a Strata controller. Mainly used to avoid hardcoding the '\\Shell\\Command\\' string everywhere.
- nl() — Return a new line.
- ok() — Creates a visual representation of an OK status. This is useful when performing an action that can fail or be skipped.
- shutdown() — The shutdown function should be called each time a command has completed execution.
- skip() — Creates a visual representation of a skipped status. This is useful when performing an action that can fail or succeed.
- startup() — The startup function should be called each time a command is being executed. It saves the Input and Output interfaces to allow the command to use it further down the process.
- tree() — Creates a visual representation of a tree branch. This is useful when generating a list of files.