You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test works fine when run by PHPUnit with single file given, and with directory given, but fails when run PHPUnit without any parameter:
// Ok
phpunit path/to/test/case.php
// Ok
phpunit path/to/tests/
// Fail
phpunit
Why ?
As you mentioned about Bug #68541, the mock need to define before native PHP functions. So I make a special test case name like 'Lib\Aaa\Aaa.php', and I'm sure it will run before all other test cases, but the mock mechanism still not work, the mocked function are not triggered at all.
Run single file are successful, i think the code is correct, but failed when batch run confuse me, do you have any tips ? Thanks.
PHP: 5.5.9
PHPUnit: 4.5.0
Os: Ubuntu 14.04 Trusty
The text was updated successfully, but these errors were encountered:
This is a handy library, and i'm using it to replace a old test case, which originally with namespace hack like:
The test purpose is to simulate PHP extension load status, and throw Exception when failed.
For using php-mock, i create a trait like this:
The source code of MockContainer is omit. In test case, use
to enable or disable mock.
This test works fine when run by PHPUnit with single file given, and with directory given, but fails when run PHPUnit without any parameter:
Why ?
As you mentioned about Bug #68541, the mock need to define before native PHP functions. So I make a special test case name like 'Lib\Aaa\Aaa.php', and I'm sure it will run before all other test cases, but the mock mechanism still not work, the mocked function are not triggered at all.
Run single file are successful, i think the code is correct, but failed when batch run confuse me, do you have any tips ? Thanks.
PHP: 5.5.9
PHPUnit: 4.5.0
Os: Ubuntu 14.04 Trusty
The text was updated successfully, but these errors were encountered: