You are here

public function ObjectManagerDecoratorTest::testAllMethodCallsAreDelegatedToTheWrappedInstance in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php \Doctrine\Tests\Common\Persistence\ObjectManagerDecoratorTest::testAllMethodCallsAreDelegatedToTheWrappedInstance()

@dataProvider getMethodParameters

File

vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php, line 49

Class

ObjectManagerDecoratorTest

Namespace

Doctrine\Tests\Common\Persistence

Code

public function testAllMethodCallsAreDelegatedToTheWrappedInstance($method, array $parameters) {
  $stub = $this->wrapped
    ->expects($this
    ->once())
    ->method($method)
    ->will($this
    ->returnValue('INNER VALUE FROM ' . $method));
  call_user_func_array(array(
    $stub,
    'with',
  ), $parameters);
  $this
    ->assertSame('INNER VALUE FROM ' . $method, call_user_func_array(array(
    $this->decorated,
    $method,
  ), $parameters));
}