MediaWiki  master
MultiHttpClientTest Class Reference

The urls herein are not actually called, because we mock the return results. More...

Inheritance diagram for MultiHttpClientTest:
Collaboration diagram for MultiHttpClientTest:

Public Member Functions

 testMultiHttpClientHeaders ()
 Test of response header handling. More...
 
 testMultiHttpClientMultipleFailure ()
 Test call of multiple urls that should all fail. More...
 
 testMultiHttpClientMultipleSuccess ()
 Test call of multiple urls that should all succeed. More...
 
 testMultiHttpClientSingleFailure ()
 Test call of a single url that should not exist, and therefore fail. More...
 
 testMultiHttpClientSingleSuccess ()
 Test call of a single url that should succeed. More...
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $client
 

Private Member Functions

 getHttpRequest ( $statusValue, $statusCode, $headers=[])
 
 mockHttpRequestFactory ( $httpRequest)
 

Detailed Description

The urls herein are not actually called, because we mock the return results.

MultiHttpClient

Definition at line 8 of file MultiHttpClientTest.php.

Member Function Documentation

◆ getHttpRequest()

MultiHttpClientTest::getHttpRequest (   $statusValue,
  $statusCode,
  $headers = [] 
)
private

◆ mockHttpRequestFactory()

MultiHttpClientTest::mockHttpRequestFactory (   $httpRequest)
private

◆ setUp()

MultiHttpClientTest::setUp ( )
protected

Definition at line 11 of file MultiHttpClientTest.php.

References $client, and class.

◆ testMultiHttpClientHeaders()

MultiHttpClientTest::testMultiHttpClientHeaders ( )

Test of response header handling.

Definition at line 134 of file MultiHttpClientTest.php.

References $name, $value, as, getHttpRequest(), list, mockHttpRequestFactory(), and StatusValue\newGood().

◆ testMultiHttpClientMultipleFailure()

MultiHttpClientTest::testMultiHttpClientMultipleFailure ( )

Test call of multiple urls that should all fail.

Definition at line 107 of file MultiHttpClientTest.php.

References $response, as, getHttpRequest(), list, mockHttpRequestFactory(), and StatusValue\newFatal().

◆ testMultiHttpClientMultipleSuccess()

MultiHttpClientTest::testMultiHttpClientMultipleSuccess ( )

Test call of multiple urls that should all succeed.

Definition at line 82 of file MultiHttpClientTest.php.

References $response, as, getHttpRequest(), list, mockHttpRequestFactory(), and StatusValue\newGood().

◆ testMultiHttpClientSingleFailure()

MultiHttpClientTest::testMultiHttpClientSingleFailure ( )

Test call of a single url that should not exist, and therefore fail.

Definition at line 64 of file MultiHttpClientTest.php.

References getHttpRequest(), list, mockHttpRequestFactory(), and StatusValue\newFatal().

◆ testMultiHttpClientSingleSuccess()

MultiHttpClientTest::testMultiHttpClientSingleSuccess ( )

Test call of a single url that should succeed.

Definition at line 48 of file MultiHttpClientTest.php.

References getHttpRequest(), list, mockHttpRequestFactory(), and StatusValue\newGood().

Member Data Documentation

◆ $client

MultiHttpClientTest::$client
protected

Definition at line 9 of file MultiHttpClientTest.php.

Referenced by setUp().


The documentation for this class was generated from the following file: