Mink
Mink copied to clipboard
Extend WebAssert
Is there a way to extend WebAssert and use extended version in context?
Currently, there is no way to use an extended WebAssert class. And I'm not sure it is really needed. You can put your custom assertions in your own classes IMO
For example we want to
- extend
addressEquals
to not check trailing slash, (instead of using assertUrlRegex everywhere) - extend
fieldExists
to add an abstraction over id | name | label etc in scenarios and make it work with css selectors. There're may be other cases i don't see right now. Extending WebAssert is much simpler than extending MinkContext default assertions sometimes.