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

Add globbing support like a native phpunit #121

Merged
merged 2 commits into from
Nov 4, 2014

Conversation

dimarick
Copy link
Contributor

@dimarick dimarick commented Nov 4, 2014

Add support phpunit.xml configurations like this:

    <testsuites>
        <testsuite name="Project Test Suite">
            <directory>../src/*/Bundle/*Bundle/Tests</directory>
        </testsuite>
    </testsuites>

*/
public function getSuitePaths($path)
{
$real = realpath($this->getConfigDir() . $path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this what isGlobRequired is for?

If you would move this check for a realpath to isGlobRequired() and call it from here, you could remove the conditional switch from getSuites() and always call getSuitePaths() (which will then call isGlobRequired and only return one element for the default case).
That would also reduce the high complexity from getSuites() (while, foreach, if, foreach).

@julianseeger
Copy link
Contributor

Thanks for this.
Would you mind adding the little refactoring to improve the simplicity/readability?

@julianseeger julianseeger added the PR label Nov 4, 2014
@dimarick
Copy link
Contributor Author

dimarick commented Nov 4, 2014

Yes, done it. Also removed getSuitePath() public method.

@korotovsky
Copy link

@julianseeger any news? :)

julianseeger added a commit that referenced this pull request Nov 4, 2014
Add globbing support like a native phpunit
@julianseeger julianseeger merged commit 069a61e into paratestphp:master Nov 4, 2014
@julianseeger
Copy link
Contributor

Slow but steady guys, slow but steady ;)
Travis green, scrutinizer green enough for now, looks good ... and ... merged. Thanks!

Edit: Release 0.9.0

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

Successfully merging this pull request may close these issues.

3 participants