File: php-text-captcha_phpunit6.diff

package info (click to toggle)
php-text-captcha 1.0.2-8
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 616 kB
  • sloc: php: 1,035; xml: 440; makefile: 8
file content (217 lines) | stat: -rw-r--r-- 8,895 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
From: Karsten Koop <KKoop@ld-didactic.de>
Date: Sun, 13 Dec 2020 14:57:10 -0400
Subject: Makes php-text-captcha build with phpunit 7.0.3 (and later).

---
 Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Equation_Test.php |  6 +++---
 Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Figlet_Test.php   |  6 +++---
 Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Image_Test.php    | 10 +++++-----
 Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Numeral_Test.php  |  4 ++--
 Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Word_Test.php     |  4 ++--
 Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Test.php                 | 10 +++++-----
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Equation_Test.php b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Equation_Test.php
index 25a3266..e652fb9 100644
--- a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Equation_Test.php
+++ b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Equation_Test.php
@@ -20,7 +20,7 @@ require_once 'Text/CAPTCHA.php';
  * @license  BSD License
  * @link     http://pear.php.net/package/Text_CAPTCHA
  */
-class Text_CAPTCHA_Driver_Equation_Test extends PHPUnit_Framework_TestCase
+class Text_CAPTCHA_Driver_Equation_Test extends PHPUnit\Framework\TestCase
 {
     /**
      * Test instance
@@ -34,7 +34,7 @@ class Text_CAPTCHA_Driver_Equation_Test extends PHPUnit_Framework_TestCase
      *
      * @return void
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->_captcha = Text_CAPTCHA::factory("Equation");
     }
@@ -74,7 +74,7 @@ class Text_CAPTCHA_Driver_Equation_Test extends PHPUnit_Framework_TestCase
      */
     public function testInvalidComplexity()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         $this->_captcha->init(
             array(
                 'severity' => 99
diff --git a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Figlet_Test.php b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Figlet_Test.php
index 4792f19..c60c6e2 100644
--- a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Figlet_Test.php
+++ b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Figlet_Test.php
@@ -20,7 +20,7 @@ require_once 'Text/CAPTCHA.php';
  * @license  BSD License
  * @link     http://pear.php.net/package/Text_CAPTCHA
  */
-class Text_CAPTCHA_Driver_Figlet_Test extends PHPUnit_Framework_TestCase
+class Text_CAPTCHA_Driver_Figlet_Test extends PHPUnit\Framework\TestCase
 {
     /**
      * Test instance
@@ -34,7 +34,7 @@ class Text_CAPTCHA_Driver_Figlet_Test extends PHPUnit_Framework_TestCase
      *
      * @return void
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->_captcha = Text_CAPTCHA::factory("Figlet");
     }
@@ -157,7 +157,7 @@ class Text_CAPTCHA_Driver_Figlet_Test extends PHPUnit_Framework_TestCase
      */
     public function testInvalidOutputType()
     {
-        $this->setExpectedException('Text_CAPTCHA_Exception');
+        $this->expectException('Text_CAPTCHA_Exception');
         $options = array(
             'font_file' => glob(dirname(__FILE__) . '/data/*.flf'),
             'output' => 'image'
diff --git a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Image_Test.php b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Image_Test.php
index 0d94f4e..9936f86 100644
--- a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Image_Test.php
+++ b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Image_Test.php
@@ -20,7 +20,7 @@ require_once 'Text/CAPTCHA.php';
  * @license  BSD License
  * @link     http://pear.php.net/package/Text_CAPTCHA
  */
-class Text_CAPTCHA_Driver_Image_Test extends PHPUnit_Framework_TestCase
+class Text_CAPTCHA_Driver_Image_Test extends PHPUnit\Framework\TestCase
 {
     /**
      * Test instance
@@ -34,7 +34,7 @@ class Text_CAPTCHA_Driver_Image_Test extends PHPUnit_Framework_TestCase
      *
      * @return void
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->_captcha = Text_CAPTCHA::factory("Image");
     }
@@ -89,7 +89,7 @@ class Text_CAPTCHA_Driver_Image_Test extends PHPUnit_Framework_TestCase
      */
     public function testTooLong2()
     {
-        $this->setExpectedException("Image_Text_Exception");
+        $this->expectException("Image_Text_Exception");
         $imageOptions = array(
             'font_path' => dirname(__FILE__) . '/data/',
             'font_file' => 'cour.ttf',
@@ -112,7 +112,7 @@ class Text_CAPTCHA_Driver_Image_Test extends PHPUnit_Framework_TestCase
      */
     public function testTooHeight()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         $imageOptions = array(
             'font_path' => dirname(__FILE__) . '/data/',
             'font_file' => 'cour.ttf',
@@ -168,7 +168,7 @@ class Text_CAPTCHA_Driver_Image_Test extends PHPUnit_Framework_TestCase
      */
     public function testInvalidOutput()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         $imageOptions = array(
             'font_path' => dirname(__FILE__) . '/data/',
             'font_file' => 'cour.ttf',
diff --git a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Numeral_Test.php b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Numeral_Test.php
index bb8a9aa..146af08 100644
--- a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Numeral_Test.php
+++ b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Numeral_Test.php
@@ -20,7 +20,7 @@ require_once 'Text/CAPTCHA.php';
  * @license  BSD License
  * @link     http://pear.php.net/package/Text_CAPTCHA
  */
-class Text_CAPTCHA_Driver_Numeral_Test extends PHPUnit_Framework_TestCase
+class Text_CAPTCHA_Driver_Numeral_Test extends PHPUnit\Framework\TestCase
 {
     /**
      * Test instance
@@ -34,7 +34,7 @@ class Text_CAPTCHA_Driver_Numeral_Test extends PHPUnit_Framework_TestCase
      *
      * @return void
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->_captcha = Text_CAPTCHA::factory("Numeral");
     }
diff --git a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Word_Test.php b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Word_Test.php
index 1473271..8217baf 100644
--- a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Word_Test.php
+++ b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Driver_Word_Test.php
@@ -20,7 +20,7 @@ require_once 'Text/CAPTCHA.php';
  * @license  BSD License
  * @link     http://pear.php.net/package/Text_CAPTCHA
  */
-class Text_CAPTCHA_Driver_Word_Test extends PHPUnit_Framework_TestCase
+class Text_CAPTCHA_Driver_Word_Test extends PHPUnit\Framework\TestCase
 {
     /**
      * Test instance
@@ -34,7 +34,7 @@ class Text_CAPTCHA_Driver_Word_Test extends PHPUnit_Framework_TestCase
      *
      * @return void
      */
-    protected function setUp()
+    protected function setUp(): void
     {
         $this->_captcha = Text_CAPTCHA::factory("Word");
     }
diff --git a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Test.php b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Test.php
index 8c6809a..a35071c 100644
--- a/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Test.php
+++ b/Text_CAPTCHA-1.0.2/tests/Text_CAPTCHA_Test.php
@@ -20,7 +20,7 @@ require_once 'Text/CAPTCHA.php';
  * @license  BSD License
  * @link     http://pear.php.net/package/Text_CAPTCHA
  */
-class Text_CAPTCHA_Test extends PHPUnit_Framework_TestCase
+class Text_CAPTCHA_Test extends PHPUnit\Framework\TestCase
 {
     /**
      * test invalid driver name.
@@ -29,7 +29,7 @@ class Text_CAPTCHA_Test extends PHPUnit_Framework_TestCase
      */
     public function testInvalidDriverName()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         Text_CAPTCHA::factory('invalidDriver');
     }
 
@@ -40,7 +40,7 @@ class Text_CAPTCHA_Test extends PHPUnit_Framework_TestCase
      */
     public function testNoDriverName()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         Text_CAPTCHA::factory('');
     }
 
@@ -70,7 +70,7 @@ class Text_CAPTCHA_Test extends PHPUnit_Framework_TestCase
      */
     public function testInit()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         $captcha = Text_CAPTCHA::factory('Word');
         $captcha->generate();
     }
@@ -82,7 +82,7 @@ class Text_CAPTCHA_Test extends PHPUnit_Framework_TestCase
      */
     public function testNullDriver()
     {
-        $this->setExpectedException("Text_CAPTCHA_Exception");
+        $this->expectException("Text_CAPTCHA_Exception");
         new Text_CAPTCHA(null);
     }
 }