public function Framework_MockObjectTest::testMockArgumentsPassedByReference4 in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php \Framework_MockObjectTest::testMockArgumentsPassedByReference4()
https://github.com/sebastianbergmann/phpunit/issues/796
File
- vendor/
phpunit/ phpunit-mock-objects/ tests/ MockObjectTest.php, line 747
Class
- Framework_MockObjectTest
- @since Class available since Release 3.0.0
Code
public function testMockArgumentsPassedByReference4() {
$foo = $this
->getMockBuilder('MethodCallbackByReference')
->setMethods(array(
'bar',
))
->disableOriginalConstructor()
->disableArgumentCloning()
->getMock();
$a = new stdClass();
$b = $c = 0;
$foo
->expects($this
->any())
->method('bar')
->with($this
->isInstanceOf("stdClass"), $b, $c)
->will($this
->returnCallback(array(
$foo,
'callback',
)));
$foo
->bar($a, $b, $c);
}