@@ -10,19 +10,19 @@ |
||
| 10 | 10 | $re = new \jumper423\decaptcha\services\TwoCaptcha([ |
| 11 | 11 | \jumper423\decaptcha\services\TwoCaptcha::PARAM_SPEC_API_KEY => 'b7e7f1002f0f917ca5a852e1c0312e8f', |
| 12 | 12 | ]); |
| 13 | - if ($re->recognize(__DIR__.'/data/Captcha.jpg')) { |
|
| 13 | + if ($re->recognize(__DIR__ . '/data/Captcha.jpg')) { |
|
| 14 | 14 | $this->assertEquals('11111111111111', $re->getCode()); |
| 15 | 15 | } else { |
| 16 | 16 | $this->assertEquals('22222222222222', $re->getError()); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | - $post_data_1 = [ 'file' => new CURLFile('file.txt') ]; |
|
| 19 | + $post_data_1 = ['file' => new CURLFile('file.txt')]; |
|
| 20 | 20 | $curl_1 = curl_init(); |
| 21 | 21 | curl_setopt($curl_1, CURLOPT_POSTFIELDS, $post_data_1); |
| 22 | 22 | echo "OK\n"; |
| 23 | 23 | |
| 24 | 24 | // exactly the same as above + added a reference to 'file' element |
| 25 | - $post_data_2 = [ 'file' => new CURLFile('file.txt') ]; |
|
| 25 | + $post_data_2 = ['file' => new CURLFile('file.txt')]; |
|
| 26 | 26 | $ref = & $post_data_2['file']; // *** |
| 27 | 27 | $curl_2 = curl_init(); |
| 28 | 28 | curl_setopt($curl_2, CURLOPT_POSTFIELDS, $post_data_2); |