Skip to content

Commit 6930839

Browse files
committed
making tests php7 compat
1 parent 35d10c1 commit 6930839

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.travis.yml

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

33
php:
4-
- 5.4
54
- 5.5
65
- 5.6
76
- 7.0
87

98
before_script:
109
- stty cols 160
11-
- 'if [ "$TRAVIS_PHP_VERSION" = "5.4" ]; then composer require symfony/finder=~2.4 --no-update ; fi'
1210
- composer install -n --prefer-source
1311

1412
script: "php vendor/bin/codecept run"

tests/_data/demo/UserService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ public function renameUser(UserModel $user, $name)
2121
$user->save();
2222
}
2323

24+
public static function renameStatic(UserModel $user, $name)
25+
{
26+
$user->renameUser($name);
27+
$user->save();
28+
}
29+
2430
public function __call($name, $args)
2531
{
2632
if ($name == 'rename') {

tests/unit/VerifierTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testVerifyMagicMethods()
5252
$user = new UserModel(['name'=>"John Smith"]);
5353

5454
// Rename the user via magic method.
55-
UserService::renameUser($user, "Bob Jones");
55+
UserService::renameStatic($user, "Bob Jones");
5656

5757
// Assert rename was counted.
5858
$userProxy->verifyInvoked('renameUser');

0 commit comments

Comments
 (0)