File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2932,9 +2932,9 @@ public function testSetProxiesRandomProxy()
2932
2932
2933
2933
$ multi_curl = new MultiCurl ();
2934
2934
$ multi_curl ->setProxies ($ proxies );
2935
- $ multi_curl ->addGet (Test::TEST_URL );
2936
- $ multi_curl ->addGet (Test::TEST_URL );
2937
- $ multi_curl ->addGet (Test::TEST_URL );
2935
+ $ get_1 = $ multi_curl ->addGet (Test::TEST_URL );
2936
+ $ get_2 = $ multi_curl ->addGet (Test::TEST_URL );
2937
+ $ get_3 = $ multi_curl ->addGet (Test::TEST_URL );
2938
2938
2939
2939
// Make MultiCurl::curls accessible and MultiCurl::initHandle()
2940
2940
// callable.
@@ -2953,10 +2953,10 @@ public function testSetProxiesRandomProxy()
2953
2953
$ multi_curl_initHandle ->invoke ($ multi_curl , $ curl );
2954
2954
}
2955
2955
2956
- // Ensure each request is set to one of the proxies.
2957
- foreach ( $ multi_curl_curls as $ curl ) {
2958
- $ this ->assertContains ($ curl ->getOpt (CURLOPT_PROXY ), $ proxies );
2959
- }
2956
+ // Ensure requests are set to one of the random proxies.
2957
+ $ this -> assertContains ( $ get_1 -> getOpt ( CURLOPT_PROXY ), $ proxies );
2958
+ $ this ->assertContains ($ get_2 ->getOpt (CURLOPT_PROXY ), $ proxies );
2959
+ $ this -> assertContains ( $ get_3 -> getOpt ( CURLOPT_PROXY ), $ proxies );
2960
2960
}
2961
2961
2962
2962
public function testSetProxiesAlreadySet ()
You can’t perform that action at this time.
0 commit comments