|
@@ 70-78 (lines=9) @@
|
| 67 |
|
* @expectedException \jumper423\decaptcha\core\DeCaptchaErrors |
| 68 |
|
* @expectedExceptionCode 16 |
| 69 |
|
*/ |
| 70 |
|
public function testGetFilePathErrorFileNotFound() |
| 71 |
|
{ |
| 72 |
|
$abstract = $this->newInstance(); |
| 73 |
|
$getFilePathCaller = function ($val) { |
| 74 |
|
return $this->getFilePath($val); |
| 75 |
|
}; |
| 76 |
|
$bound = $getFilePathCaller->bindTo($abstract, $abstract); |
| 77 |
|
$bound(__DIR__.'/data/Captcha1.jpg'); |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
/** |
| 81 |
|
* @expectedException \jumper423\decaptcha\core\DeCaptchaErrors |
|
@@ 85-93 (lines=9) @@
|
| 82 |
|
* @expectedExceptionMessage Файл не загрузился: https://upload.wikimedia.org/wikipedia/commons/6/69/Captcha46.jpg123 |
| 83 |
|
* @expectedExceptionCode 15 |
| 84 |
|
*/ |
| 85 |
|
public function testGetFilePathErrorFileIsNotLoaded() |
| 86 |
|
{ |
| 87 |
|
$abstract = $this->newInstance(); |
| 88 |
|
$getFilePathCaller = function ($val) { |
| 89 |
|
return $this->getFilePath($val); |
| 90 |
|
}; |
| 91 |
|
$bound = $getFilePathCaller->bindTo($abstract, $abstract); |
| 92 |
|
$bound('https://upload.wikimedia.org/wikipedia/commons/6/69/Captcha46.jpg123'); |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
// public function testGetResponse() |
| 96 |
|
// { |