Skip to content

Use named datasets in spec tests #650

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

Merged
merged 1 commit into from
Jul 30, 2019

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Jul 29, 2019

This fixes issues in tools like PhpStorm that are not able to show test progress when the test name changes.

@alcaeus alcaeus self-assigned this Jul 29, 2019
@alcaeus alcaeus force-pushed the phpunit-named-datasets branch from 681cc5f to f680868 Compare July 29, 2019 08:58
This fixes issues in tools like PhpStorm that are not able to show test progress when the test name changes.
@alcaeus alcaeus force-pushed the phpunit-named-datasets branch from f680868 to 0ab1782 Compare July 29, 2019 12:51
Copy link
Member

@jmikola jmikola left a comment

Choose a reason for hiding this comment

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

Can you post a quick example of CLI output when one of these tests fails? I wasn't aware that data providers could name each entry via the array/iterator key, which is why I had been using setName(). I'd just like to make sure we can still easily identify the JSON test by name in the event of a failure.

@jmikola
Copy link
Member

jmikola commented Jul 30, 2019

Tested this myself:

  1. MongoDB\Tests\SpecTests\TransactionsSpecTest::testTransactions with data set "error-labels: add unknown commit label to writeConcernError MaxTimeMSExpired"...

That looks totally fine. PHPUnit's manual no longer displays docs for 5.x, but I assume this functionality is nothing new. LGTM!

@alcaeus
Copy link
Member Author

alcaeus commented Jul 30, 2019

That looks totally fine. PHPUnit's manual no longer displays docs for 5.x, but I assume this functionality is nothing new. LGTM!

Not sure when it was added, but it was before PHPUnit 4 IIRC.

alcaeus added a commit to alcaeus/mongo-php-library that referenced this pull request Jul 30, 2019
@alcaeus alcaeus merged commit 0ab1782 into mongodb:master Jul 30, 2019
@alcaeus alcaeus deleted the phpunit-named-datasets branch July 30, 2019 07:00
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

Successfully merging this pull request may close these issues.

2 participants