function ProxyBuilderTest::testBuildServiceMethodReturnsVoid
Same name in other branches
- 9 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildServiceMethodReturnsVoid()
- 11.x core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildServiceMethodReturnsVoid()
@covers ::buildMethodBody
File
-
core/
tests/ Drupal/ Tests/ Component/ ProxyBuilder/ ProxyBuilderTest.php, line 147
Class
- ProxyBuilderTest
- @coversDefaultClass \Drupal\Component\ProxyBuilder\ProxyBuilder @group proxy_builder
Namespace
Drupal\Tests\Component\ProxyBuilderCode
public function testBuildServiceMethodReturnsVoid() : void {
$class = TestServiceMethodReturnsVoid::class;
$result = $this->proxyBuilder
->build($class);
// @todo Solve the silly linebreak for array()
$method_body = <<<'EOS'
/**
* {@inheritdoc}
*/
public function methodReturnsVoid(string $parameter): void
{
$this->lazyLoadItself()->methodReturnsVoid($parameter);
}
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.