public function ProxyBuilderTest::testBuildWithProtectedAndPrivateMethod in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest::testBuildWithProtectedAndPrivateMethod()
@covers ::buildMethod @covers ::buildParameter @covers ::buildMethodBody
File
- core/
tests/ Drupal/ Tests/ Component/ ProxyBuilder/ ProxyBuilderTest.php, line 216 - Contains \Drupal\Tests\Component\ProxyBuilder\ProxyBuilderTest.
Class
- ProxyBuilderTest
- @coversDefaultClass \Drupal\Component\ProxyBuilder\ProxyBuilder @group proxy_builder
Namespace
Drupal\Tests\Component\ProxyBuilderCode
public function testBuildWithProtectedAndPrivateMethod() {
$class = 'Drupal\\Tests\\Component\\ProxyBuilder\\TestServiceWithProtectedMethods';
$result = $this->proxyBuilder
->build($class);
$method_body = <<<'EOS'
/**
* {@inheritdoc}
*/
public function testMethod($parameter)
{
return $this->lazyLoadItself()->testMethod($parameter);
}
EOS;
$this
->assertEquals($this
->buildExpectedClass($class, $method_body), $result);
}