Refactor append snippets test to use fixtures#1707
Refactor append snippets test to use fixtures#1707carlos-granados merged 2 commits intoBehat:3.xfrom
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.
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.
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.
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.
Good shout, updated
acoulton
left a comment
There was a problem hiding this comment.
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.
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.
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