Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commitce803ee

Browse files
michalbundyraweierophinney
authored andcommitted
PHPUnit updated
1 parent236cf47 commitce803ee

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

‎test/CommonWordTest.php‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@
99

1010
namespaceZendTest\Captcha;
1111

12+
usePHPUnit\Framework\TestCase;
13+
useZend\Captcha\Exception\InvalidArgumentException;
14+
1215
/**
1316
* @group Zend_Captcha
1417
*/
15-
abstractclass CommonWordTestextends\PHPUnit_Framework_TestCase
18+
abstractclass CommonWordTestextendsTestCase
1619
{
1720
/**
1821
* Word adapter class name
@@ -28,7 +31,8 @@ public function testLoadInvalidSessionClass()
2831
{
2932
$wordAdapter =new$this->wordClass;
3033
$wordAdapter->setSessionClass('ZendTest\Captcha\InvalidClassName');
31-
$this->setExpectedException('Zend\Captcha\Exception\InvalidArgumentException','not found');
34+
$this->expectException(InvalidArgumentException::class);
35+
$this->expectExceptionMessage('not found');
3236
$wordAdapter->getSession();
3337
}
3438

‎test/FactoryTest.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespaceZendTest\Captcha;
1111

1212
useDirectoryIterator;
13-
usePHPUnit_Framework_TestCaseasTestCase;
13+
usePHPUnit\Framework\TestCase;
1414
useZend\Captcha;
1515

1616
class FactoryTestextends TestCase

‎test/ImageTest.php‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
namespaceZendTest\Captcha;
1111

1212
useDirectoryIterator;
13+
usePHPUnit\Framework\TestCase;
1314
useZend\Captcha\ImageasImageCaptcha;
15+
useZend\Captcha\Exception\NoFontProvidedException;
16+
useZend\Captcha\Exception\ImageNotLoadableException;
1417

1518
/**
1619
* @group Zend_Captcha
1720
*/
18-
class ImageTestextends\PHPUnit_Framework_TestCase
21+
class ImageTestextendsTestCase
1922
{
2023
protected$tmpDir;
2124

@@ -221,14 +224,14 @@ public function testWrongWordNotValid()
221224

222225
publicfunctiontestNoFontProvidedWillThrowException()
223226
{
224-
$this->setExpectedException('Zend\Captcha\Exception\NoFontProvidedException');
227+
$this->expectException(NoFontProvidedException::class);
225228
$captcha =newImageCaptcha();
226229
$captcha->generate();
227230
}
228231

229232
publicfunctiontestImageProvidedNotLoadableWillThrowException()
230233
{
231-
$this->setExpectedException('Zend\Captcha\Exception\ImageNotLoadableException');
234+
$this->expectException(ImageNotLoadableException::class);
232235
$captcha =newImageCaptcha([
233236
'font' =>__DIR__.'/../Pdf/_fonts/Vera.ttf',
234237
'startImage' =>'file_not_found.png',

‎test/ReCaptchaTest.php‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
namespaceZendTest\Captcha;
1111

12+
usePHPUnit\Framework\TestCase;
1213
useZend\Captcha\ReCaptcha;
1314
useZend\Http\ClientasHttpClient;
1415
useZend\Http\Client\Adapter\Socket;
@@ -17,7 +18,7 @@
1718
/**
1819
* @group Zend_Captcha
1920
*/
20-
class ReCaptchaTestextends\PHPUnit_Framework_TestCase
21+
class ReCaptchaTestextendsTestCase
2122
{
2223
/**
2324
* Sets up the fixture, for example, open a network connection.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp