コード例 #1
0
    public function testWarmUp()
    {
        $am = $this
            ->getMockBuilder('Assetic\\Factory\\LazyAssetManager')
            ->disableOriginalConstructor()
            ->getMock()
        ;

        $am->expects($this->once())->method('load');
        
        $container = $this
            ->getMockBuilder('Symfony\\Component\\DependencyInjection\\Container')
            ->setConstructorArgs(array())
            ->getMock()
        ;
        
        $container
            ->expects($this->once())
            ->method('get')
            ->with('assetic.asset_manager')
            ->will($this->returnValue($am))
        ;

        $warmer = new AssetManagerCacheWarmer($container);
        $warmer->warmUp('/path/to/cache');
    }
コード例 #2
0
 public function testWarmUp()
 {
     $am = $this->getMockBuilder('Assetic\\Factory\\LazyAssetManager')->disableOriginalConstructor()->getMock();
     $am->expects($this->once())->method('load');
     $warmer = new AssetManagerCacheWarmer($am);
     $warmer->warmUp('/path/to/cache');
 }