File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11Verify
22======
33
4- BDD Assertions for [ PHPUnit] [ 1 ] and [ Codeception] [ 2 ]
4+ BDD Assertions for [ PHPUnit] [ 1 ] or [ Codeception] [ 2 ]
55
66This is very tiny wrapper for PHPUnit assertions, that are aimed to make tests a bit more readable.
77With [ BDD] [ 3 ] assertions influenced by [ Chai] [ 4 ] , [ Jasmine] [ 5 ] , and [ RSpec] [ 6 ] your assertions would be a bit closer to natural language.
88
9- [ ![ Build Status] ( https://travis-ci.org/Codeception/Verify.png?branch=master )] ( https://travis-ci.org/Codeception/Verify ) [ ![ Latest Stable Version ] ( https://poser.pugx.org/codeception/verify/v/stable.png )] ( https://packagist.org/packages/codeception/verify )
9+ [ ![ Build Status] ( https://travis-ci.org/Codeception/Verify.png?branch=master )] ( https://travis-ci.org/Codeception/Verify )
1010
1111``` php
1212$user = User::find(1);
Original file line number Diff line number Diff line change 11<?php
2- if (!class_exists ('PHPUnit_Framework_Assert ' ) && class_exists ('PHPUnit\Framework\Assert ' )) {
3- class_alias ('PHPUnit\Framework\Assert ' , 'PHPUnit_Framework_Assert ' );
4- }
5-
62if (!function_exists ('verify ' )) {
73 /**
84 * @param $description
@@ -60,10 +56,7 @@ function expect_not($fallacy) {
6056 * @return \Codeception\Verify
6157 */
6258 function verify_file () {
63- include_once __DIR__ .'/Verify.php ' ;
64-
65- $ reflect = new ReflectionClass ('\Codeception\Verify ' );
66- $ verify = $ reflect ->newInstanceArgs (func_get_args ());
59+ $ verify = call_user_func_array ('verify ' , func_get_args ());
6760 $ verify ->setIsFileExpectation (true );
6861 return $ verify ;
6962 }
You can’t perform that action at this time.
0 commit comments