浏览代码

[AsseticBundle] fixed unit tests

Fabien Potencier 14 年之前
父节点
当前提交
fc23f39335
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      src/Symfony/Bundle/AsseticBundle/Tests/DependencyInjection/AsseticExtensionTest.php

+ 2 - 3
src/Symfony/Bundle/AsseticBundle/Tests/DependencyInjection/AsseticExtensionTest.php

@@ -46,9 +46,7 @@ class AsseticExtensionTest extends \PHPUnit_Framework_TestCase
             $this->markTestSkipped('Assetic is not available.');
         }
 
-        $this->kernel = $this->getMockBuilder('Symfony\\Component\\HttpKernel\\Kernel')
-            ->disableOriginalConstructor()
-            ->getMock();
+        $this->kernel = $this->getMock('Symfony\\Component\\HttpKernel\\KernelInterface');
 
         $this->container = new ContainerBuilder();
         $this->container->addScope(new Scope('request'));
@@ -61,6 +59,7 @@ class AsseticExtensionTest extends \PHPUnit_Framework_TestCase
         $this->container->setParameter('kernel.cache_dir', __DIR__);
         $this->container->setParameter('kernel.debug', false);
         $this->container->setParameter('kernel.root_dir', __DIR__);
+        $this->container->set('kernel', $this->kernel);
     }
 
     /**