Skip to content

Commit 8e4aab9

Browse files
committed
PHPUnit 6 support; Extending improved
1 parent 3fc6f0e commit 8e4aab9

9 files changed

Lines changed: 764 additions & 210 deletions

File tree

.travis.yml

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

33
php:
4-
- 5.3
5-
- 5.4
6-
- 5.5
7-
- 5.6
84
- 7
5+
- 7.1
6+
- 7.2
7+
98

109
sudo: false
1110

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ With Composer:
7474

7575
```
7676
"require-dev": {
77-
"codeception/verify": "*"
77+
"codeception/verify": "^1.0"
7878
}
7979
```
8080

@@ -84,10 +84,27 @@ Use in any test `verify` function instead of `$this->assert*` methods.
8484

8585
## Extending
8686

87-
`Codeception\Verify` class can be extended with custom assertions. You write your own `verify` function that would instantiate your extended version of Verify class.
87+
In order to add more assertions you can override `Codeception\Verify` class:
8888

8989
```php
90-
function verify(
90+
class MyVerify extends \Codeception\Verify {
91+
92+
public function success()
93+
{
94+
}
95+
96+
}
9197
```
9298

99+
Set the class name to `Codeception\Verify::override` property to `verify` function use it:
100+
101+
```php
102+
103+
\Codeception\Verify::override = MyVerify::class;
104+
105+
// access overridden class
106+
verify('it works')->success();
107+
```
108+
109+
93110
**License: MIT**

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
1.0.0

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@
77
"email": "davert.php@mailican.com"
88
}
99
],
10-
"require-dev": {
11-
"phpunit/phpunit": "~4.0"
10+
"require": {
11+
"php": ">= 7.0",
12+
"phpunit/phpunit": "> 6.0"
1213
},
1314
"autoload": {
14-
"files": ["src/Codeception/function.php"]
15+
"files": ["src/Codeception/function.php"],
16+
"psr-4":{
17+
"Codeception\\": "src\\Codeception"
18+
}
1519
}
1620
}

0 commit comments

Comments
 (0)