public function ProxyBuilderTest::testBuildReturnReference in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildReturnReference()
- 10 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildReturnReference()
@covers ::buildMethod @covers ::buildMethodBody
File
- core/
tests/ Drupal/ Tests/ Component/ ProxyBuilder/ ProxyBuilderTest.php, line 151 - Contains \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest.
Class
- ProxyBuilderTest
- @coversDefaultClass \Drupal\Component\ProxyBuilder\ProxyBuilder @group proxy_builder
Namespace
Drupal\Tests\Component\ProxyBuilderCode
public function testBuildReturnReference() {
$class = 'Drupal\\Tests\\Component\\ProxyBuilder\\TestServiceReturnReference';
$result = $this->proxyBuilder
->build($class);
// @todo Solve the silly linebreak for array()
$method_body = <<<'EOS'
/**
* {@inheritdoc}
*/
public function &returnReference()
{
return $this->lazyLoadItself()->returnReference();
}
EOS;
$this
->assertEquals($this
->buildExpectedClass($class, $method_body), $result);
}