You are here

public function Framework_ProxyObjectTest::testMockedMethodIsProxiedToOriginalMethod in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php \Framework_ProxyObjectTest::testMockedMethodIsProxiedToOriginalMethod()

File

vendor/phpunit/phpunit-mock-objects/tests/ProxyObjectTest.php, line 16

Class

Framework_ProxyObjectTest
@since Class available since Release 2.0.0

Code

public function testMockedMethodIsProxiedToOriginalMethod() {
  $proxy = $this
    ->getMockBuilder('Bar')
    ->enableProxyingToOriginalMethods()
    ->getMock();
  $proxy
    ->expects($this
    ->once())
    ->method('doSomethingElse');
  $foo = new Foo();
  $this
    ->assertEquals('result', $foo
    ->doSomething($proxy));
}