Symfony\Bundle\AsseticBundle\Tests\Factory\AssetFactoryTest::setUp PHP Method

setUp() protected method

protected setUp ( )
    protected function setUp()
    {
        if (!class_exists('Assetic\\AssetManager')) {
            $this->markTestSkipped('Assetic is not available.');
        }
        $this->kernel = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\KernelInterface')->getMock();
        $this->container = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ContainerInterface')->getMock();
        $this->parameterBag = $this->getMockBuilder('Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBagInterface')->getMock();
        $this->factory = new AssetFactory($this->kernel, $this->container, $this->parameterBag, '/path/to/web');
    }

Usage Example

 protected function setUp()
 {
     parent::setUp();
     $this->configResolver = $this->getMock('\\eZ\\Publish\\Core\\MVC\\ConfigResolverInterface');
     $this->parser = $this->getMock('\\eZ\\Bundle\\EzPublishCoreBundle\\DependencyInjection\\Configuration\\SiteAccessAware\\DynamicSettingParserInterface');
 }