Testing Tasks
Atoum
Runs atoum tests
php
<?php
$this->taskAtoum()
->files('path/to/test.php')
->configFile('config/dev.php')
->run()
?>
tags($tags)
Tag or Tags to filter.lightReport()
Display result using the light reporter.tap()
Display result using the tap reporter.bootstrap($file)
Path to the bootstrap file.configFile($file)
Path to the config file.debug()
Use atoum's debug mode.files($files)
Test file or test files to run.directories($directories)
Test directory or directories to run.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Behat
Executes Behat tests
php
<?php
$this->taskBehat()
->format('pretty')
->noInteraction()
->run();
?>
stopOnFail()
*return
$thisnoInteraction()
*return
$thisconfig($config_file)
*param string
$config_filecolors()
*return
$thisnoColors()
*return
$thissuite($suite)
*param string
$suiteverbose($level = null)
*param string
$levelformat($formater)
*param string
$formatersetOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Codecept
Executes Codeception tests
php
<?php
// config
$this->taskCodecept()
->suite('acceptance')
->env('chrome')
->group('admin')
->xml()
->html()
->run();
?>
suite($suite)
*param string
$suitetest($testName)
*param string
$testNamegroup($group)
set group option. Can be called multiple timesexcludeGroup($group)
*param string
$groupjson($file = null)
generate json reportxml($file = null)
generate xml JUnit reporthtml($dir = null)
Generate html reporttap($file = null)
generate tap reportconfigFile($file)
provides config file other then defaultcodeception.yml
with-c
optioncoverage($cov = null)
collect codecoverage in raw format. You may pass name of cov file to save resultscoverageXml($xml = null)
collect code coverage in xml format. You may pass name of xml file to save resultscoverageHtml($html = null)
collect code coverage and generate html report. You may passdebug()
*return
$thisnoRebuild()
*return
$thisnoExit()
*return
$thisfailGroup($failGroup)
*param string
$failGroupsetOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
PHPUnit
Runs PHPUnit tests
php
<?php
$this->taskPHPUnit()
->group('core')
->bootstrap('test/bootstrap.php')
->run()
?>
filter($filter)
*param string
$filtergroup($group)
*param string
$groupexcludeGroup($group)
*param string
$groupjson($file = null)
addslog-json
option to runnerxml($file = null)
addslog-junit
optiontap($file = null)
*param string
$filebootstrap($file)
*param string
$fileconfigFile($file)
*param string
$filedebug()
*return
$thisfiles($files)
Directory of test files or single test file to run.file($file)
Test the provided file.setOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.
Phpspec
Executes Phpspec tests
php
<?php
$this->taskPhpspec()
->format('pretty')
->noInteraction()
->run();
?>
stopOnFail()
noCodeGeneration()
quiet()
verbose($level = null)
*param string
$levelnoAnsi()
*return
$thisnoInteraction()
*return
$thisconfig($config_file)
*param string
$config_fileformat($formater)
*param string
$formatersetOutput($output)
Sets the Console Output.setProcessInput($input)
Pass an input to the process. Can be resource created with fopen() or stringdir($dir)
Changes working directory of commandarg($arg)
Pass argument to executable. Its value will be automatically escaped.args($args)
Pass methods parameters as arguments to executable. Argument valuesrawArg($arg)
Pass the provided string in its raw (as provided) form as an argument to executable.option($option, $value = null, $separator = null)
Pass option to executable. Options are prefixed with--
, value can be provided in second parameter.options(array $options, $separator = null)
Pass multiple options to executable. The associative array containsoptionList($option, $value = null, $separator = null)
Pass an option with multiple values to executable. Value can be a string or array.