We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
here is test:
<?php class UtilTest extends \PHPUnit\Framework\TestCase { use \phpmock\phpunit\PHPMock; public function testTime() { $time = $this->getFunctionMock(__NAMESPACE__, "time"); $time->expects($this->once())->willReturn(3); $this->assertEquals(3, time()); } }
and console output:
$ vendor/bin/phpunit PHPUnit 5.7.23 by Sebastian Bergmann and contributors. F 1 / 1 (100%) Time: 48 ms, Memory: 5.25MB There was 1 failure: 1) UtilTest::testTime Failed asserting that 1508265379 matches expected 3. /Users/barton/projects/wisnet/wisnetds/Tests/utilities/UtilTest.php:13 FAILURES! Tests: 1, Assertions: 1, Failures: 1.
And php version:
~/projects/wisnet/wisnetds (unittest)$ php -v PHP 5.6.31 (cli) (built: Aug 7 2017 20:28:16) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans ~/projects/wisnet/wisnetds (unittest)$
The text was updated successfully, but these errors were encountered:
Put UtilTest into a namespace.
UtilTest
Sorry, something went wrong.
That did it. Many thanks!
No branches or pull requests
here is test:
and console output:
And php version:
The text was updated successfully, but these errors were encountered: