Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

supre
Copy link
Contributor

@supre supre commented Oct 23, 2015

We upgraded our symfony package to 2.7.5, only to find out that our codeception is broken.
After a whole day of debugging it turns out the issue was related to the recent modifications made to the Finder component for Symfony (#15826, #15802, #15803).

In the path to the test in the suite (in our case, we have a test for each bundle), an additional / is added between the test and the suite, thus causing an issue in GroupLoader. i.e.:

Line 109 of file Lib/GroupManager:

if ($filename == $testPattern) {
    $groups[] = $group;
}

We were getting the following scenario:
$filename: /path/to/suite//path/to/test
$testPattern: /path/to/suite/path/to/test

And, the if condition was failing in all cases, which meant that none of our groups was working.

The provided fix will fix the path in case it's broken but will leave it unchanged in case it's fine.

@raistlin
Copy link
Member

Looks good to me.

@DavertMik
Copy link
Member

I didn't understand where actually this additional / is added to path.
To merge this PR I need clearly understand what this fix does and is that the optimal one. From what I see it is better to find where // is added and remove this redundant / in place

@raistlin
Copy link
Member

The additional "/" seems to be added by Syfmony, I've also seen this in earlier versions of Syfmony, but never caused a problem to me.

@DavertMik
Copy link
Member

Ok, @raistlin then we are merging it.

Thanks

DavertMik added a commit that referenced this pull request Oct 24, 2015
Fix for broken paths introduced after Symfony upgraded to 2.7.5.
@DavertMik DavertMik merged commit 98330ce into Codeception:2.1 Oct 24, 2015
@supre supre deleted the Fix-#Broken-Filenames-In-Groups branch October 24, 2015 23:22
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.

3 participants