115 lines
3.2 KiB
YAML
115 lines
3.2 KiB
YAML
name: TesterTrait
|
|
class_comment: null
|
|
dependencies:
|
|
- name: Assert
|
|
type: class
|
|
source: PHPUnit\Framework\Assert
|
|
- name: InputInterface
|
|
type: class
|
|
source: Symfony\Component\Console\Input\InputInterface
|
|
- name: ConsoleOutput
|
|
type: class
|
|
source: Symfony\Component\Console\Output\ConsoleOutput
|
|
- name: OutputInterface
|
|
type: class
|
|
source: Symfony\Component\Console\Output\OutputInterface
|
|
- name: StreamOutput
|
|
type: class
|
|
source: Symfony\Component\Console\Output\StreamOutput
|
|
- name: CommandIsSuccessful
|
|
type: class
|
|
source: Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful
|
|
properties: []
|
|
methods:
|
|
- name: getDisplay
|
|
visibility: public
|
|
parameters:
|
|
- name: normalize
|
|
default: 'false'
|
|
comment: "# * @author Amrouche Hamza <hamza.simperfit@gmail.com>\n# */\n# trait\
|
|
\ TesterTrait\n# {\n# private StreamOutput $output;\n# private array $inputs =\
|
|
\ [];\n# private bool $captureStreamsIndependently = false;\n# private InputInterface\
|
|
\ $input;\n# private int $statusCode;\n# \n# /**\n# * Gets the display returned\
|
|
\ by the last execution of the command or application.\n# *\n# * @throws \\RuntimeException\
|
|
\ If it's called before the execute method"
|
|
- name: getErrorOutput
|
|
visibility: public
|
|
parameters:
|
|
- name: normalize
|
|
default: 'false'
|
|
comment: '# * Gets the output written to STDERR by the application.
|
|
|
|
# *
|
|
|
|
# * @param bool $normalize Whether to normalize end of lines to \n or not'
|
|
- name: getInput
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Gets the input instance used by the last execution of the command
|
|
or application.'
|
|
- name: getOutput
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Gets the output instance used by the last execution of the command
|
|
or application.'
|
|
- name: getStatusCode
|
|
visibility: public
|
|
parameters: []
|
|
comment: '# * Gets the status code returned by the last execution of the command
|
|
or application.
|
|
|
|
# *
|
|
|
|
# * @throws \RuntimeException If it''s called before the execute method'
|
|
- name: assertCommandIsSuccessful
|
|
visibility: public
|
|
parameters:
|
|
- name: message
|
|
default: ''''''
|
|
comment: null
|
|
- name: setInputs
|
|
visibility: public
|
|
parameters:
|
|
- name: inputs
|
|
comment: '# * Sets the user inputs.
|
|
|
|
# *
|
|
|
|
# * @param array $inputs An array of strings representing each input
|
|
|
|
# * passed to the command input stream
|
|
|
|
# *
|
|
|
|
# * @return $this'
|
|
- name: initOutput
|
|
visibility: private
|
|
parameters:
|
|
- name: options
|
|
comment: '# * Initializes the output property.
|
|
|
|
# *
|
|
|
|
# * Available options:
|
|
|
|
# *
|
|
|
|
# * * decorated: Sets the output decorated flag
|
|
|
|
# * * verbosity: Sets the output verbosity flag
|
|
|
|
# * * capture_stderr_separately: Make output of stdOut and stdErr separately
|
|
available'
|
|
- name: createStream
|
|
visibility: private
|
|
parameters:
|
|
- name: inputs
|
|
comment: '# * @return resource'
|
|
traits:
|
|
- PHPUnit\Framework\Assert
|
|
- Symfony\Component\Console\Input\InputInterface
|
|
- Symfony\Component\Console\Output\ConsoleOutput
|
|
- Symfony\Component\Console\Output\OutputInterface
|
|
- Symfony\Component\Console\Output\StreamOutput
|
|
- Symfony\Component\Console\Tester\Constraint\CommandIsSuccessful
|
|
interfaces: []
|