Skip to content

Commit 33d641d

Browse files
committed
[SoapClient] Fixed tests if proxy exists in environment variables
1 parent 2917057 commit 33d641d

11 files changed

+35
-14
lines changed

src/BeSimple/SoapClient/Tests/AxisInterop/MtomAxisInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class MtomAxisInteropTest extends TestCase
2828
'base64Binary' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\base64Binary',
2929
'AttachmentRequest' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\AttachmentRequest',
3030
),
31+
'proxy_host' => false,
3132
);
3233

3334
public function testAttachment()
@@ -48,4 +49,4 @@ public function testAttachment()
4849
// $this->assertEquals($b64->_, file_get_contents($fileCreatedByServer));
4950
// unlink($fileCreatedByServer);
5051
}
51-
}
52+
}

src/BeSimple/SoapClient/Tests/AxisInterop/SwaAxisInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class SwaAxisInteropTest extends TestCase
3737
'uploadFile' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\uploadFile',
3838
'uploadFileResponse' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\uploadFileResponse',
3939
),
40+
'proxy_host' => false,
4041
);
4142

4243
public function testUploadDownloadText()
@@ -74,4 +75,4 @@ public function testUploadDownloadImage()
7475

7576
$this->assertEquals($upload->data, $result->data);
7677
}
77-
}
78+
}

src/BeSimple/SoapClient/Tests/AxisInterop/WsAddressingAxisInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class WsAddressingAxisInteropTest extends TestCase
3232
private $options = array(
3333
'soap_version' => SOAP_1_2,
3434
'features' => SOAP_SINGLE_ELEMENT_ARRAYS, // make sure that result is array for size=1
35+
'proxy_host' => false,
3536
);
3637

3738
public function testSession()
@@ -56,4 +57,4 @@ public function testSession()
5657

5758
$this->assertEquals($soapSessionId1, $soapSessionId2);
5859
}
59-
}
60+
}

src/BeSimple/SoapClient/Tests/AxisInterop/WsSecuritySigEncAxisInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class WsSecuritySigEncAxisInteropTest extends TestCase
6464
'addBookResponse' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\addBookResponse',
6565
'BookInformation' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\BookInformation',
6666
),
67+
'proxy_host' => false,
6768
);
6869

6970
public function testSigEnc()
@@ -103,4 +104,4 @@ public function testSigEnc()
103104

104105
// getBooksByType("scifi");
105106
}
106-
}
107+
}

src/BeSimple/SoapClient/Tests/AxisInterop/WsSecurityUserPassAxisInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class WsSecurityUserPassAxisInteropTest extends TestCase
4040
'addBookResponse' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\addBookResponse',
4141
'BookInformation' => 'BeSimple\SoapClient\Tests\AxisInterop\Fixtures\BookInformation',
4242
),
43+
'proxy_host' => false,
4344
);
4445

4546
public function testUserPassText()
@@ -93,4 +94,4 @@ public function testUserPassDigest()
9394

9495
// getBooksByType("scifi");
9596
}
96-
}
97+
}

src/BeSimple/SoapClient/Tests/CurlTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,19 @@ public function testGetResponse()
7474

7575
public function testGetResponseBody()
7676
{
77-
$curl = new Curl();
77+
$curl = new Curl(array(
78+
'proxy_host' => false,
79+
));
7880

7981
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
8082
$this->assertEquals('This is a testfile for cURL.', $curl->getResponseBody());
8183
}
8284

8385
public function testGetResponseContentType()
8486
{
85-
$curl = new Curl();
87+
$curl = new Curl(array(
88+
'proxy_host' => false,
89+
));
8690

8791
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
8892
$this->assertEquals('text/plain; charset=UTF-8', $curl->getResponseContentType());
@@ -93,7 +97,9 @@ public function testGetResponseContentType()
9397

9498
public function testGetResponseHeaders()
9599
{
96-
$curl = new Curl();
100+
$curl = new Curl(array(
101+
'proxy_host' => false,
102+
));
97103

98104
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
99105
$this->assertEquals(117 + self::$websererPortLength, strlen($curl->getResponseHeaders()));
@@ -104,7 +110,9 @@ public function testGetResponseHeaders()
104110

105111
public function testGetResponseStatusCode()
106112
{
107-
$curl = new Curl();
113+
$curl = new Curl(array(
114+
'proxy_host' => false,
115+
));
108116

109117
$curl->exec(sprintf('http://localhost:%d/curl.txt', WEBSERVER_PORT));
110118
$this->assertEquals(200, $curl->getResponseStatusCode());

src/BeSimple/SoapClient/Tests/ServerInterop/MtomServerInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class MtomServerInteropTest extends TestCase
2020
'base64Binary' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\base64Binary',
2121
'AttachmentRequest' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\AttachmentRequest',
2222
),
23+
'proxy_host' => false,
2324
);
2425

2526
public function testAttachment()
@@ -40,4 +41,4 @@ public function testAttachment()
4041
$this->assertEquals($b64->_, file_get_contents($fileCreatedByServer));
4142
unlink($fileCreatedByServer);
4243
}
43-
}
44+
}

src/BeSimple/SoapClient/Tests/ServerInterop/SwaServerInteropTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class SwaServerInteropTest extends TestCase
2323
'uploadFile' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\uploadFile',
2424
'uploadFileResponse' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\uploadFileResponse',
2525
),
26+
'proxy_host' => false,
2627
);
2728

2829
public function testUploadDownloadText()

src/BeSimple/SoapClient/Tests/ServerInterop/WsSecuritySigEncServerInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class WsSecuritySigEncServerInteropTest extends TestCase
3030
'addBookResponse' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\addBookResponse',
3131
'BookInformation' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\BookInformation',
3232
),
33+
'proxy_host' => false,
3334
);
3435

3536
public function testSigEnc()
@@ -69,4 +70,4 @@ public function testSigEnc()
6970

7071
// getBooksByType("scifi");
7172
}
72-
}
73+
}

src/BeSimple/SoapClient/Tests/ServerInterop/WsSecurityUserPassServerInteropTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class WsSecurityUserPassServerInteropTest extends TestCase
2929
'addBookResponse' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\addBookResponse',
3030
'BookInformation' => 'BeSimple\SoapClient\Tests\ServerInterop\Fixtures\BookInformation',
3131
),
32+
'proxy_host' => false,
3233
);
3334

3435
public function testUserPassText()
@@ -82,4 +83,4 @@ public function testUserPassDigest()
8283

8384
// getBooksByType("scifi");
8485
}
85-
}
86+
}

0 commit comments

Comments
 (0)