[英]Behat and Mink: assert page ignore trailing slash
I want to write simple test like: 我想编写简单的测试,例如:
Given I am on "/"
Then I should be on "/login"
I want ignore trailing slash on assertion, so, if user redirected to /login/
, assertion should not fail. 我想忽略断言中的尾部斜杠,因此,如果用户重定向到
/login/
,则断言不会失败。
Now it fail. 现在失败了。 How can I fix it?
我该如何解决?
一种方法是覆盖I的方法,并删除最后一个/(如果需要)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.