Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix codeception path in config who was ignored #16

Merged
merged 2 commits into from
Feb 9, 2017
Merged

Fix codeception path in config who was ignored #16

merged 2 commits into from
Feb 9, 2017

Conversation

vinpel
Copy link
Member

@vinpel vinpel commented Feb 9, 2017

This little commit allow the usage of the "path" variable.
.php-censor.yml:

  codeception:
    config: "subdir1/subdir2"
    allow_failures: false
    args: "report.xml -vv "
    path:
       - "subdir1/subdir2/tests/_output/"

directory structure :

  • /subdir1/subdir2/codeception.yml
  • /subdir1/subdir2/tests/_output
  • /subdir1/subdir2/tests/unit.suite.yml
  • ...
namespace: subdir1\subdir2\tests
actor: Tester
paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    helpers: tests/_support
settings:
    bootstrap: _bootstrap.php
    colors: true
    memory_limit: 1024M
modules:
    config:
        Yii2:
            configFile: '../../common/config/test-local.php'

@corpsee
Copy link
Member

corpsee commented Feb 9, 2017

In this form, it will not work, I think. $this->path is an array.

@vinpel
Copy link
Member Author

vinpel commented Feb 9, 2017

line 144 of the file :

  if (!file_exists($outputPath . 'report.xml')) {
             foreach ($this->path as $path) {
                 $outputPath = $this->builder->buildPath . $path . '/';
                 if (file_exists($outputPath . 'report.xml')) {
                     break;
                 }
             }
         }

the code want an array too.

i've showed my .php-censor.yml file to show path is an array

@corpsee
Copy link
Member

corpsee commented Feb 9, 2017

You are right, thanks!

@corpsee corpsee merged commit c4d78c0 into php-censor:master Feb 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants