File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33abstract class RequestsTest_Transport_Base extends PHPUnit_Framework_TestCase {
44 public function setUp () {
5- if (!call_user_func (array ($ this ->transport , 'test ' ))) {
5+ $ callback = array ($ this ->transport , 'test ' );
6+ $ supported = call_user_func ($ callback );
7+
8+ if (!$ supported ) {
69 $ this ->markTestSkipped ($ this ->transport . ' is not available ' );
710 return ;
811 }
12+
13+ $ ssl_supported = call_user_func ($ callback , array ('ssl ' => true ));
14+ if (!$ ssl_supported ) {
15+ $ this ->skip_https = true ;
16+ }
917 }
1018 protected $ skip_https = false ;
1119
Original file line number Diff line number Diff line change 22
33class RequestsTest_Transport_fsockopen extends RequestsTest_Transport_Base {
44 protected $ transport = 'Requests_Transport_fsockopen ' ;
5-
6- protected $ skip_https = false ;
7- public function setUp () {
8- // If OpenSSL isn't loaded, this should fail
9- if (!defined ('OPENSSL_VERSION_NUMBER ' )) {
10- $ this ->skip_https = true ;
11- }
12- }
135}
You can’t perform that action at this time.
0 commit comments