Codeception improvement (+ docs)
This commit is contained in:
parent
c4d78c065c
commit
72579e769f
|
@ -12,6 +12,8 @@ Configuration
|
||||||
|
|
||||||
* **args** - Optional - The string of arguments to be passed to the run command.**Important**, due to the assumption made on line 132 regarding the value of `--xml` being the next argument which will not be correct if the user provides arguments using this config param, you must specify `report.xml` before any user input arguments to satisfy the report processing on line 146.
|
* **args** - Optional - The string of arguments to be passed to the run command.**Important**, due to the assumption made on line 132 regarding the value of `--xml` being the next argument which will not be correct if the user provides arguments using this config param, you must specify `report.xml` before any user input arguments to satisfy the report processing on line 146.
|
||||||
|
|
||||||
|
* **path** - Optional - The path from the root of your project to the root of the codeception `_output` directory
|
||||||
|
|
||||||
#### Default values
|
#### Default values
|
||||||
|
|
||||||
- config
|
- config
|
||||||
|
@ -21,11 +23,25 @@ Configuration
|
||||||
|
|
||||||
- args
|
- args
|
||||||
- Empty string
|
- Empty string
|
||||||
|
|
||||||
|
- path
|
||||||
|
- `tests/_output/`
|
||||||
|
- `test/_log`
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
|
||||||
|
```yml
|
||||||
|
codeception:
|
||||||
|
config: "codeception.yml"
|
||||||
|
args: "--no-ansi --coverage-html"
|
||||||
```
|
```
|
||||||
codeception:
|
|
||||||
config: "codeception.yml"
|
Or
|
||||||
args: "--no-ansi --coverage-html"
|
|
||||||
|
```yml
|
||||||
|
codeception:
|
||||||
|
config: "subdir1/subdir2"
|
||||||
|
args: "report.xml -vv "
|
||||||
|
path:
|
||||||
|
- "subdir1/subdir2/tests/_output/"
|
||||||
```
|
```
|
||||||
|
|
|
@ -64,11 +64,13 @@ class Codeception extends Plugin implements ZeroConfigPluginInterface
|
||||||
} else {
|
} else {
|
||||||
$this->ymlConfigFile = $options['config'];
|
$this->ymlConfigFile = $options['config'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($options['args'])) {
|
if (isset($options['args'])) {
|
||||||
$this->args = (string) $options['args'];
|
$this->args = (string) $options['args'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($options['path'])) {
|
if (isset($options['path'])) {
|
||||||
$this->path = $options['path'];
|
array_unshift($this->path, $options['path']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,7 +148,7 @@ class Codeception extends Plugin implements ZeroConfigPluginInterface
|
||||||
|
|
||||||
if (!file_exists($outputPath . 'report.xml')) {
|
if (!file_exists($outputPath . 'report.xml')) {
|
||||||
foreach ($this->path as $path) {
|
foreach ($this->path as $path) {
|
||||||
$outputPath = $this->builder->buildPath . $path . '/';
|
$outputPath = $this->builder->buildPath . rtrim($path, '/\\') . '/';
|
||||||
if (file_exists($outputPath . 'report.xml')) {
|
if (file_exists($outputPath . 'report.xml')) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue