function ProxyBuilderTest::testBuildWithPublicStaticMethod
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildWithPublicStaticMethod()
- 8.9.x core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildWithPublicStaticMethod()
- 10 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildWithPublicStaticMethod()
@covers ::buildMethod @covers ::buildParameter @covers ::buildMethodBody
File
-
core/
tests/ Drupal/ Tests/ Component/ ProxyBuilder/ ProxyBuilderTest.php, line 262
Class
- ProxyBuilderTest
- @coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Component%21ProxyBuilder%21ProxyBuilder.php/class/ProxyBuilder/11.x" 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 testBuildWithPublicStaticMethod() : void {
$class = 'Drupal\\Tests\\Component\\ProxyBuilder\\TestServiceWithPublicStaticMethod';
$result = $this->proxyBuilder
->build($class);
// Ensure that the static method is not wrapped.
$method_body = <<<'EOS'
/**
* {@inheritdoc}
*/
public static function testMethod($parameter)
{
\Drupal\Tests\Component\ProxyBuilder\TestServiceWithPublicStaticMethod::testMethod($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.