|
1 |
| -<?php |
| 1 | +end |
| 2 | +stop |
| 3 | +delete |
| 4 | +close |
| 5 | +void |
2 | 6 |
|
3 |
| -namespace Codebird; |
4 |
| -require_once ('test/codebirdm.php'); |
5 |
| - |
6 |
| -/** |
7 |
| - * A Twitter library in PHP. |
8 |
| - * |
9 |
| - * @package codebird-test |
10 |
| - * @author Jublo Limited <support@jublo.net> |
11 |
| - * @copyright 2010-2018 Jublo Limited <support@jublo.net> |
12 |
| - * @license https://opensource.org/licenses/GPL-3.0 GNU General Public License 3.0 |
13 |
| - * @link https://github.com/jublonet/codebird-php |
14 |
| - */ |
15 |
| - |
16 |
| -/** |
17 |
| - * cURL tests |
18 |
| - * |
19 |
| - * @package codebird-test |
20 |
| - */ |
21 |
| -class Curl_Test extends \PHPUnit\Framework\TestCase |
22 |
| -{ |
23 |
| - /** |
24 |
| - * Initialise Codebird class |
25 |
| - * |
26 |
| - * @return \Codebird\Codebird The Codebird class |
27 |
| - */ |
28 |
| - protected function getCB() |
29 |
| - { |
30 |
| - $cb = new CodebirdM(); |
31 |
| - |
32 |
| - return $cb; |
33 |
| - } |
34 |
| - |
35 |
| - /** |
36 |
| - * Tests _getCurlInitialization |
37 |
| - */ |
38 |
| - public function testGetCurlInitialization() |
39 |
| - { |
40 |
| - $cb = $this->getCB(); |
41 |
| - $id = $cb->call('_getCurlInitialization', ['https://test']); |
42 |
| - $this->assertEquals( |
43 |
| - [ |
44 |
| - 'url' => 'https://test', |
45 |
| - CURLOPT_RETURNTRANSFER => 1, |
46 |
| - CURLOPT_FOLLOWLOCATION => 0, |
47 |
| - CURLOPT_HEADER => 1, |
48 |
| - CURLOPT_SSL_VERIFYPEER => 1, |
49 |
| - CURLOPT_SSL_VERIFYHOST => 2, |
50 |
| - CURLOPT_CAINFO => substr(__DIR__, 0, -strlen(basename(__DIR__))) . 'src/cacert.pem', |
51 |
| - CURLOPT_USERAGENT => 'codebird-php/' . $cb->getStatic('_version') |
52 |
| - . ' +https://github.com/jublonet/codebird-php' |
53 |
| - ], |
54 |
| - $cb->get('_requests')[$id] |
55 |
| - ); |
56 |
| - } |
57 |
| -} |
0 commit comments