function ProxyBuilderTest::testBuildReturnReference
Same name and namespace in other branches
- 8.9.x 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()
- 11.x 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 175
Class
- ProxyBuilderTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21ProxyBuilder%21ProxyBuilder.php/class/ProxyBuilder/9" title="Generates the string representation of the proxy service." class="local">\Drupal\Component\ProxyBuilder\ProxyBuilder</a> @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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.