Skip to content

Commit e6796e1

Browse files
committed
Update to PHPUnit 8
1 parent 5f3cd86 commit e6796e1

38 files changed

+54
-51
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor/
22
composer.lock
3+
.phpunit.result.cache

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
language: php
22

33
php:
4-
- 7.0
5-
- 7.1
64
- 7.2
5+
- 7.3
6+
- 7.4
77

88
before_script:
99
- composer install

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
WP Validation - PHP Standalone Validation Library
22
======================================================
33

4-
[![Build Status](https://img.shields.io/travis/rakit/validation.svg?style=flat-square)](https://travis-ci.org/rakit/validation)
4+
[![Build Status](https://img.shields.io/travis/gdarko/wp-validation.svg?style=flat-square)](https://travis-ci.org/rakit/validation)
55
[![License](http://img.shields.io/:license-mit-blue.svg?style=flat-square)](http://doge.mit-license.org)
66

77

@@ -28,7 +28,7 @@ This is a fork of the original library written by [Rakit](https://github.com/rak
2828
#### Installation
2929

3030
```
31-
composer require "rakit/validation"
31+
composer require gdarko/wp-validation
3232
```
3333

3434
#### Usage

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"ext-mbstring": "*"
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "^6.5",
26+
"phpunit/phpunit": "^8.0",
2727
"squizlabs/php_codesniffer": "^3"
2828
},
2929
"scripts": {

tests/Rules/AcceptedTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class AcceptedTest extends TestCase
99
{
1010

11-
public function setUp()
11+
public function setUp() : void
1212
{
1313
$this->rule = new Accepted;
1414
}

tests/Rules/AfterTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AfterTest extends TestCase
1414
*/
1515
protected $validator;
1616

17-
public function setUp()
17+
public function setUp() : void
1818
{
1919
$this->validator = new After();
2020
}
@@ -31,18 +31,19 @@ public function testOnlyAWellFormedDateCanBeValidated($date)
3131

3232
/**
3333
* @dataProvider getInvalidDates
34-
* @expectedException Exception
3534
*/
3635
public function testANonWellFormedDateCannotBeValidated($date)
3736
{
37+
$this->expectException(\Exception::class);
38+
3839
$this->validator->fillParameters(["tomorrow"])->check($date);
3940
}
4041

41-
/**
42-
* @expectedException Exception
43-
*/
42+
4443
public function testUserProvidedParamCannotBeValidatedBecauseItIsInvalid()
4544
{
45+
$this->expectException(\Exception::class);
46+
4647
$this->validator->fillParameters(["to,morrow"])->check("now");
4748
}
4849

tests/Rules/AlphaDashTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class AlphaDashTest extends TestCase
99
{
1010

11-
public function setUp()
11+
public function setUp() : void
1212
{
1313
$this->rule = new AlphaDash;
1414
}

tests/Rules/AlphaNumTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class AlphaNumTest extends TestCase
99
{
1010

11-
public function setUp()
11+
public function setUp() : void
1212
{
1313
$this->rule = new AlphaNum;
1414
}

tests/Rules/AlphaSpacesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class AlphaSpacesTest extends TestCase
99
{
1010

11-
public function setUp()
11+
public function setUp() : void
1212
{
1313
$this->rule = new AlphaSpaces;
1414
}

tests/Rules/AlphaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class AlphaTest extends TestCase
1010
{
1111

12-
public function setUp()
12+
public function setUp() : void
1313
{
1414
$this->rule = new Alpha;
1515
}

0 commit comments

Comments
 (0)