-
-
Notifications
You must be signed in to change notification settings - Fork 616
Refactor append snippets test to use fixtures #1707
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
Refactor append snippets test to use fixtures #1707
Conversation
| Behat\Behat\Tester\Exception\PendingException; | ||
| use Behat\Gherkin\Node\PyStringNode, | ||
| Behat\Gherkin\Node\TableNode; | ||
| use Behat\Behat\Context\Context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new fixture files must follow the coding standards of the project, so the expected output needs to be changed to also follow these standards. For example here we do not use use statements with multiple imports
| } | ||
| private function doSomethingUndefinedWith() {} | ||
| private function useClasses(PyStringNode $node, TableNode $table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we add some use statements we must have some code which actually uses these classes, otherwise the CS fixer will complain, so I added these dummy methods which just use these classes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth having this as a code comment (partly in case a tool / someone feels like removing the unused method params in future)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good shout, updated
acoulton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @carlos-granados just a small suggestion.
It'll be great to get these all onto the newer fixture style :)
| } | ||
| private function doSomethingUndefinedWith() {} | ||
| private function useClasses(PyStringNode $node, TableNode $table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth having this as a code comment (partly in case a tool / someone feels like removing the unused method params in future)?
be3b62e to
efccea0
Compare
acoulton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks @carlos-granados
I want to start refactoring all existing tests to use the fixtures instead of creating the files on the fly. This PR refactors the "append snippets" test to use the fixtures