You are here

public function ObjectManagerDecoratorTest::testAllMethodCallsAreDelegatedToTheWrappedInstance in Plug 7

@dataProvider getMethodParameters

File

lib/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));
}