Пример #1
0
 /**
  * @covers ::getProxyCode
  */
 public function testGetProxyCodeWithSameClassMultipleTimes()
 {
     $definition = new Definition('Drupal\\Tests\\Component\\ProxyBuilder\\TestService');
     $definition->setLazy(TRUE);
     $class = 'class Drupal_Tests_Component_ProxyBuilder_TestService_Proxy {}';
     $this->proxyBuilder->expects($this->once())->method('build')->with('Drupal\\Tests\\Component\\ProxyBuilder\\TestService')->willReturn($class);
     $result = $this->proxyDumper->getProxyCode($definition);
     $this->assertEquals($class, $result);
     $result = $this->proxyDumper->getProxyCode($definition);
     $this->assertEquals('', $result);
 }