File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,12 +34,26 @@ protected function setUp(): void
3434 * @test
3535 * @dataProvider shortcodeFixtures
3636 */
37- public function processes_shortcodes (string $ shortcode , ControllerReference $ controllerReference , string $ renderStrategy )
38- {
37+ public function processes_shortcodes (
38+ string $ shortcode ,
39+ ControllerReference $ expectedControllerReference ,
40+ string $ expectedRenderStrategy
41+ ): void {
3942 $ this ->fragmentHandler ->expects ($ this ->once ())
4043 ->method ('render ' )
41- ->with ($ controllerReference , $ renderStrategy )
42- ->willReturn ('OK ' );
44+ ->willReturnCallback (
45+ function (
46+ ControllerReference $ actualControllerReference ,
47+ string $ actualRenderStrategy
48+ ) use (
49+ $ expectedControllerReference ,
50+ $ expectedRenderStrategy
51+ ) {
52+ return $ actualControllerReference ->controller === $ expectedControllerReference ->controller && $ actualRenderStrategy === $ expectedRenderStrategy
53+ ? 'OK '
54+ : 'unexpected parameter values ' ;
55+ }
56+ );
4357
4458 $ this ->assertEquals (
4559 'OK ' ,
You can’t perform that action at this time.
0 commit comments