Skip to content

Commit 9a7ebcf

Browse files
authored
Add simple mocked response object to httpResponse property on ResultMockFactory (#1776)
* Add simple mocked response object to httpResponse property on ResultMockFactory so can call ->info() method via mock result. * Update changelog
1 parent fed5dd6 commit 9a7ebcf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Enable compiler optimization for the `sprintf` function.
88
- Avoid calls to spl_object_ methods when computing cache key.
9+
- Added SimpleMockedResponse to response of ResultMockFactory.
910

1011
## 1.22.0
1112

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)