Skip to content

Commit 1879ff8

Browse files
committed
Add simple mocked response object to httpResponse property on ResultMockFactory so can call ->info() method via mock result.
1 parent 4014863 commit 1879ff8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Core/src/Test/ResultMockFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ private static function getResponseObject(): Response
285285
$property->setAccessible(true);
286286
$property->setValue($response, true);
287287

288+
$property = $reflectionClass->getProperty('httpResponse');
289+
$property->setAccessible(true);
290+
$property->setValue($response, new SimpleMockedResponse());
291+
288292
return $response;
289293
}
290294
}

0 commit comments

Comments
 (0)