class ExtensionCompilerPassTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/Tests/Compiler/ExtensionCompilerPassTest.php \Symfony\Component\DependencyInjection\Tests\Compiler\ExtensionCompilerPassTest
@author Wouter J <wouter@wouterj.nl>
Hierarchy
- class \Symfony\Component\DependencyInjection\Tests\Compiler\ExtensionCompilerPassTest extends \Symfony\Component\DependencyInjection\Tests\Compiler\PHPUnit_Framework_TestCase
Expanded class hierarchy of ExtensionCompilerPassTest
File
- vendor/
symfony/ dependency-injection/ Tests/ Compiler/ ExtensionCompilerPassTest.php, line 10
Namespace
Symfony\Component\DependencyInjection\Tests\CompilerView source
class ExtensionCompilerPassTest extends \PHPUnit_Framework_TestCase {
private $container;
private $pass;
public function setUp() {
$this->container = $this
->getMock('Symfony\\Component\\DependencyInjection\\ContainerBuilder');
$this->pass = new ExtensionCompilerPass();
}
public function testProcess() {
$extension1 = $this
->createExtensionMock(true);
$extension1
->expects($this
->once())
->method('process');
$extension2 = $this
->createExtensionMock(false);
$extension3 = $this
->createExtensionMock(false);
$extension4 = $this
->createExtensionMock(true);
$extension4
->expects($this
->once())
->method('process');
$this->container
->expects($this
->any())
->method('getExtensions')
->will($this
->returnValue(array(
$extension1,
$extension2,
$extension3,
$extension4,
)));
$this->pass
->process($this->container);
}
private function createExtensionMock($hasInlineCompile) {
return $this
->getMock('Symfony\\Component\\DependencyInjection\\' . ($hasInlineCompile ? 'Compiler\\CompilerPassInterface' : 'Extension\\ExtensionInterface'));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExtensionCompilerPassTest:: |
private | property | ||
ExtensionCompilerPassTest:: |
private | property | ||
ExtensionCompilerPassTest:: |
private | function | ||
ExtensionCompilerPassTest:: |
public | function | ||
ExtensionCompilerPassTest:: |
public | function |