File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -936,8 +936,8 @@ public function amOnAction(string $action, array $params = [])
936
936
$ routes = $ router ->getRouteCollection ()->getIterator ();
937
937
938
938
foreach ($ routes as $ route ) {
939
- $ controller = basename ( $ route ->getDefault ('_controller ' ) );
940
- if ($ controller === $ action ) {
939
+ $ controller = $ route ->getDefault ('_controller ' );
940
+ if (substr_compare ( $ controller, $ action , - strlen ( $ action )) === 0 ) {
941
941
$ resource = $ router ->match ($ route ->getPath ());
942
942
$ url = $ router ->generate (
943
943
$ resource ['_route ' ],
@@ -1096,8 +1096,8 @@ public function seeCurrentActionIs(string $action)
1096
1096
$ routes = $ router ->getRouteCollection ()->getIterator ();
1097
1097
1098
1098
foreach ($ routes as $ route ) {
1099
- $ controller = basename ( $ route ->getDefault ('_controller ' ) );
1100
- if ($ controller === $ action ) {
1099
+ $ controller = $ route ->getDefault ('_controller ' );
1100
+ if (substr_compare ( $ controller, $ action , - strlen ( $ action )) === 0 ) {
1101
1101
$ request = $ this ->client ->getRequest ();
1102
1102
$ currentAction = basename ($ request ->attributes ->get ('_controller ' ));
1103
1103
You can’t perform that action at this time.
0 commit comments