Skip to content

Commit c28ada3

Browse files
committed
:octocat: fix for #2 & #3
1 parent a780569 commit c28ada3

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

src/HTTPOptionsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ protected function setCA():void{
171171
foreach($cafiles as $file){
172172
if(\is_file($file) || (\is_link($file) && \is_file(\readlink($file)))){
173173
$this->curl_options[\CURLOPT_CAINFO] = $file;
174+
$this->ca_info = $file;
174175
return;
175176
}
176177
}

tests/Psr18/CurlClientNoCATest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Class CurlClientNoCATest
4+
*
5+
* @filesource CurlClientNoCATest.php
6+
* @created 28.08.2018
7+
* @package chillerlan\HTTPTest\Psr18
8+
* @author smiley <smiley@chillerlan.net>
9+
* @copyright 2018 smiley
10+
* @license MIT
11+
*/
12+
13+
namespace chillerlan\HTTPTest\Psr18;
14+
15+
use chillerlan\HTTP\{HTTPOptions, Psr18\CurlClient};
16+
17+
class CurlClientNoCATest extends HTTPClientTestAbstract{
18+
19+
protected function setUp():void{
20+
$options = new HTTPOptions([
21+
'ca_info' => null,
22+
'user_agent' => $this::USER_AGENT,
23+
]);
24+
25+
$this->http = new CurlClient($options);
26+
}
27+
28+
}

tests/Psr18/StreamClientNoCATest.php

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
/**
3+
* Class StreamClientNoCATest
4+
*
5+
* @filesource StreamClientNoCATest.php
6+
* @created 23.02.2019
7+
* @package chillerlan\HTTPTest\Psr18
8+
* @author smiley <smiley@chillerlan.net>
9+
* @copyright 2019 smiley
10+
* @license MIT
11+
*/
12+
13+
namespace chillerlan\HTTPTest\Psr18;
14+
15+
use chillerlan\HTTP\{HTTPOptions, Psr18\StreamClient};
16+
17+
class StreamClientNoCATest extends HTTPClientTestAbstract{
18+
19+
protected function setUp():void{
20+
$options = new HTTPOptions([
21+
'ca_info' => null,
22+
'user_agent' => $this::USER_AGENT,
23+
]);
24+
25+
$this->http = new StreamClient($options);
26+
}
27+
28+
}

0 commit comments

Comments
 (0)