public function Framework_MockObjectTest::testVerificationOfNeverFailsWithEmptyParameters in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php \Framework_MockObjectTest::testVerificationOfNeverFailsWithEmptyParameters()
File
- vendor/
phpunit/ phpunit-mock-objects/ tests/ MockObjectTest.php, line 610
Class
- Framework_MockObjectTest
- @since Class available since Release 3.0.0
Code
public function testVerificationOfNeverFailsWithEmptyParameters() {
$mock = $this
->getMock('SomeClass', array(
'right',
'wrong',
), array(), '', true, true, true);
$mock
->expects($this
->never())
->method('right')
->with();
try {
$mock
->right();
$this
->fail('Expected exception');
} catch (PHPUnit_Framework_ExpectationFailedException $e) {
$this
->assertSame('SomeClass::right() was not expected to be called.', $e
->getMessage());
}
$this
->resetMockObjects();
}