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