8000 bug #5528 [reate_framework] Fix mock $matcher (kenjis) · symfony/symfony-docs@ef4807f · GitHub
[go: up one dir, main page]

Skip to content

Commit ef4807f

Browse files
committed
bug #5528 [reate_framework] Fix mock $matcher (kenjis)
This PR was merged into the 2.3 branch. Discussion ---------- [reate_framework] Fix mock $matcher We need `getContext` method, otherwise we get: > Fatal error: Call to a member function fromRequest() on a non-object in /Users/kenji/work/framework/src/Simplex/Framework.php on line 24 line 24: ~~~php $this->matcher->getContext()->fromRequest($request); ~~~ Commits ------- 1103e00 Fix mock $matcher
2 parents 29c80ce + 1103e00 commit ef4807f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

create_framework/unit-testing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ Response::
157157
}
158158
)))
159159
;
160+
$matcher
161+
->expects($this->once())
162+
->method('getContext')
163+
->will($this->returnValue($this->getMock('Symfony\Component\Routing\RequestContext')))
164+
;
160165
$resolver = new ControllerResolver();
161166

162167
$framework = new Framework($matcher, $resolver);

0 commit comments

Comments
 (0)
0