Skip to content

Fix codeception path in config who was ignored#16

Merged
corpsee merged 2 commits intophp-censor:masterfrom
vinpel:master
Feb 9, 2017
Merged

Fix codeception path in config who was ignored#16
corpsee merged 2 commits intophp-censor:masterfrom
vinpel:master

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