/** * @test */ public function build_initializeBundle_addCompilerPass() { $containerBuilder = $this->createMock('Symfony\\Component\\DependencyInjection\\ContainerBuilder'); //Expect compiler pass to be added $containerBuilder->expects($this->once())->method('addCompilerPass')->with($this->isInstanceOf('Scheb\\TwoFactorBundle\\DependencyInjection\\Compiler\\ProviderCompilerPass')); $bundle = new SchebTwoFactorBundle(); $bundle->build($containerBuilder); }
/** * @test */ public function build_initializeBundle_addCompilerPass() { $containerBuilder = $this->getMockBuilder("Symfony\\Component\\DependencyInjection\\ContainerBuilder")->disableOriginalConstructor()->getMock(); //Expect compiler pass to be added $containerBuilder->expects($this->once())->method('addCompilerPass')->with($this->isInstanceOf("Scheb\\TwoFactorBundle\\DependencyInjection\\Compiler\\ProviderCompilerPass")); $bundle = new SchebTwoFactorBundle(); $bundle->build($containerBuilder); }