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

Codeception group files bug on windows #2720

Closed
klokovas opened this issue Jan 14, 2016 · 3 comments
Closed

Codeception group files bug on windows #2720

klokovas opened this issue Jan 14, 2016 · 3 comments

Comments

@klokovas
Copy link

I try to group my cept tests and execute them on Windows but i met a problem with "/" chars.They are duplicated in path.

I suggest to fix this problem with this code:

 public function loadTests()
    {
        $finder = Finder::create()->files()->sortByName()->in($this->path)->followLinks();

        foreach (self::$formats as $format) {
            $formatFinder = clone($finder);
            $testFiles = $formatFinder->name("*$format.php");
            foreach ($testFiles as $test) {
                $pathname = str_replace(DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR, DIRECTORY_SEPARATOR, $test->getPathname());
                call_user_func([$this, "add$format"], $pathname);
            }
        }
    }

Replace "/" with DIRECTORY_SEPARATOR.

@Naktibalda
Copy link
Member

I merged one bug fix yesterday - #2718
have you found a different issue?

@klokovas
Copy link
Author

Thanks!

Ok, sorry. I have not seen pull request before i opened issue.
Bug has fixed.
Can you tell me about next release date with this fix?

@klokovas
Copy link
Author

I was writing about TestLoader::loadTests, but your fix in GroupManager works too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants