function ProxyBuilderTest::testBuildSimpleMethod
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildSimpleMethod()
- 10 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildSimpleMethod()
- 11.x core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildSimpleMethod()
@covers ::buildMethod @covers ::buildMethodBody
File
-
core/
tests/ Drupal/ Tests/ Component/ ProxyBuilder/ ProxyBuilderTest.php, line 77
Class
- ProxyBuilderTest
- @coversDefaultClass \Drupal\Component\ProxyBuilder\ProxyBuilder @group proxy_builder
Namespace
Drupal\Tests\Component\ProxyBuilderCode
public function testBuildSimpleMethod() {
$class = 'Drupal\\Tests\\Component\\ProxyBuilder\\TestServiceSimpleMethod';
$result = $this->proxyBuilder
->build($class);
$method_body = <<<'EOS'
/**
* {@inheritdoc}
*/
public function method()
{
return $this->lazyLoadItself()->method();
}
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.