Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3717335
D649.id1635.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
986 B
Referenced Files
None
Subscribers
None
D649.id1635.diff
View Options
diff --git a/tests/DockerHubImageTest.php b/tests/DockerHubImageTest.php
--- a/tests/DockerHubImageTest.php
+++ b/tests/DockerHubImageTest.php
@@ -38,7 +38,7 @@
}
public function testGetTriggerBuild () {
- $client = $this->mockHttpClient(200);
+ $client = self::mockHttpClient(200);
$this->assertInstanceOf(
TriggerBuild::class,
$this->image->getTriggerBuild($client, '0000')
diff --git a/tests/WithMockHttpClient.php b/tests/WithMockHttpClient.php
--- a/tests/WithMockHttpClient.php
+++ b/tests/WithMockHttpClient.php
@@ -15,7 +15,7 @@
* @param int $httpResponseCode The HTTP response code to mock
* @return \GuzzleHttp\Client
*/
- protected function mockHttpClient ($httpResponseCode) {
+ protected static function mockHttpClient ($httpResponseCode = 200) {
$handler = self::getCustomMockHttpClientHandler($httpResponseCode);
return new Client(['handler' => $handler]);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 03:32 (21 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2232459
Default Alt Text
D649.id1635.diff (986 B)
Attached To
Mode
D649: Set mock methods as static
Attached
Detach File
Event Timeline
Log In to Comment