File tree Expand file tree Collapse file tree 2 files changed +35
-16
lines changed Expand file tree Collapse file tree 2 files changed +35
-16
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * Class HTTPClientTest
4+ *
5+ * @filesource HTTPClientTest.php
6+ * @created 28.08.2018
7+ * @package chillerlan\HTTPTest
8+ * @author smiley <smiley@chillerlan.net>
9+ * @copyright 2018 smiley
10+ * @license MIT
11+ */
12+
13+ namespace chillerlan \HTTPTest \Client ;
14+
15+ use chillerlan \HTTP \{CurlClient , HTTPOptions };
16+
17+ class CurlClientTest extends HTTPClientTestAbstract{
18+
19+ protected function setUp (){
20+ $ options = new HTTPOptions ([
21+ 'ca_info ' => __DIR__ .'/../cacert.pem ' ,
22+ 'user_agent ' => $ this ::USER_AGENT ,
23+ ]);
24+
25+ $ this ->http = new CurlClient ($ options );
26+ }
27+
28+ }
Original file line number Diff line number Diff line change 11<?php
22/**
3- * Class HTTPClientTest
3+ * Class HTTPClientTestAbstract
44 *
5- * @filesource HTTPClientTest .php
6- * @created 28.08 .2018
7- * @package chillerlan\HTTPTest
5+ * @filesource HTTPClientTestAbstract .php
6+ * @created 10.11 .2018
7+ * @package chillerlan\HTTPTest\Client
88 * @author smiley <smiley@chillerlan.net>
99 * @copyright 2018 smiley
1010 * @license MIT
1111 */
1212
13- namespace chillerlan \HTTPTest ;
13+ namespace chillerlan \HTTPTest \ Client ;
1414
15- use chillerlan \HTTP \{ CurlClient , HTTPOptions , Psr7 \Request } ;
15+ use chillerlan \HTTP \Psr7 \Request ;
1616use PHPUnit \Framework \TestCase ;
1717
18- class CurlClientTest extends TestCase{
18+ abstract class HTTPClientTestAbstract extends TestCase{
1919
2020 protected const USER_AGENT = 'chillerlanHttpTest/2.0 ' ;
2121
@@ -24,15 +24,6 @@ class CurlClientTest extends TestCase{
2424 */
2525 protected $ http ;
2626
27- protected function setUp (){
28- $ options = new HTTPOptions ([
29- 'ca_info ' => __DIR__ .'/cacert.pem ' ,
30- 'user_agent ' => $ this ::USER_AGENT ,
31- ]);
32-
33- $ this ->http = new CurlClient ($ options );
34- }
35-
3627 public function testSendRequest (){
3728
3829 try {
You can’t perform that action at this time.
0 commit comments