MakeTest
extends AbstractMaker
in package
implements
InputAwareMakerInterface
FinalYes
Convenient abstract class for makers.
Tags
Table of Contents
Interfaces
- InputAwareMakerInterface
- Lets the configureDependencies method access to the command's input.
Constants
- DESCRIPTIONS = ['TestCase' => 'basic PHPUnit tests', 'KernelTestCase' => 'basic tests that have access to Symfony services', 'WebTestCase' => 'to run browser-like scenarios, but that don\'t execute JavaScript code', 'ApiTestCase' => 'to run API-oriented scenarios', 'PantherTestCase' => 'to run e2e scenarios, using a real-browser or HTTP client and a real web server']
- DOCS = ['TestCase' => 'https://symfony.com/doc/current/testing.html#unit-tests', 'KernelTestCase' => 'https://symfony.com/doc/current/testing/database.html#functional-testing-of-a-doctrine-repository', 'WebTestCase' => 'https://symfony.com/doc/current/testing.html#functional-tests', 'ApiTestCase' => 'https://api-platform.com/docs/distribution/testing/', 'PantherTestCase' => 'https://github.com/symfony/panther#testing-usage']
Methods
- configureCommand() : void
- configureDependencies() : void
- Configure any library dependencies that your maker requires.
- generate() : void
- getCommandAliases() : iterable<string|int, mixed>
- getCommandDescription() : string
- getCommandName() : string
- interact() : void
- If necessary, you can use this method to interactively ask the user for input.
- addDependencies() : string
- writeSuccessMessage() : void
- handleDeprecatedMakerCommands() : void
- useLegacyContainerProperty() : bool
Constants
DESCRIPTIONS
private
mixed
DESCRIPTIONS
= ['TestCase' => 'basic PHPUnit tests', 'KernelTestCase' => 'basic tests that have access to Symfony services', 'WebTestCase' => 'to run browser-like scenarios, but that don\'t execute JavaScript code', 'ApiTestCase' => 'to run API-oriented scenarios', 'PantherTestCase' => 'to run e2e scenarios, using a real-browser or HTTP client and a real web server']
DOCS
private
mixed
DOCS
= ['TestCase' => 'https://symfony.com/doc/current/testing.html#unit-tests', 'KernelTestCase' => 'https://symfony.com/doc/current/testing/database.html#functional-testing-of-a-doctrine-repository', 'WebTestCase' => 'https://symfony.com/doc/current/testing.html#functional-tests', 'ApiTestCase' => 'https://api-platform.com/docs/distribution/testing/', 'PantherTestCase' => 'https://github.com/symfony/panther#testing-usage']
Methods
configureCommand()
public
configureCommand(Command $command, InputConfiguration $inputConfig) : void
Parameters
- $command : Command
- $inputConfig : InputConfiguration
configureDependencies()
Configure any library dependencies that your maker requires.
public
configureDependencies(DependencyBuilder $dependencies[, InputInterface $input = null ]) : void
Parameters
- $dependencies : DependencyBuilder
- $input : InputInterface = null
generate()
public
generate(InputInterface $input, ConsoleStyle $io, Generator $generator) : void
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $generator : Generator
getCommandAliases()
public
static getCommandAliases() : iterable<string|int, mixed>
Tags
Return values
iterable<string|int, mixed>getCommandDescription()
public
static getCommandDescription() : string
Return values
stringgetCommandName()
public
static getCommandName() : string
Return values
stringinteract()
If necessary, you can use this method to interactively ask the user for input.
public
interact(InputInterface $input, ConsoleStyle $io, Command $command) : void
Parameters
- $input : InputInterface
- $io : ConsoleStyle
- $command : Command
addDependencies()
protected
addDependencies(array<string|int, mixed> $dependencies[, string $message = null ]) : string
Parameters
- $dependencies : array<string|int, mixed>
- $message : string = null
Return values
stringwriteSuccessMessage()
protected
writeSuccessMessage(ConsoleStyle $io) : void
Parameters
- $io : ConsoleStyle
handleDeprecatedMakerCommands()
private
handleDeprecatedMakerCommands(InputInterface $input, ConsoleStyle $io) : void
Parameters
- $input : InputInterface
- $io : ConsoleStyle
Tags
useLegacyContainerProperty()
private
useLegacyContainerProperty() : bool