[HttpKernel] Fix component 'standalone' testsuite
- Missing dependency in one file - Move helper class out of KernelTest because it implemented an interface that depends on another component (thus would crash the testsuite if invoked)
This commit is contained in:
parent
8ff2838bb8
commit
0b0fe74e93
@ -25,6 +25,10 @@ class BundleTest extends \PHPUnit_Framework_TestCase
|
||||
$this->markTestSkipped('The "Console" component is not available');
|
||||
}
|
||||
|
||||
if (!class_exists('Symfony\Component\DependencyInjection\ContainerAwareInterface')) {
|
||||
$this->markTestSkipped('The "DependencyInjection" component is not available');
|
||||
}
|
||||
|
||||
if (!class_exists('Symfony\Component\Finder\Finder')) {
|
||||
$this->markTestSkipped('The "Finder" component is not available');
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Component\HttpKernel\Tests\Fixtures;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
|
||||
|
||||
abstract class TestBundle implements BundleInterface
|
||||
{
|
||||
// We can not extend Symfony\Component\HttpKernel\Bundle\Bundle as we want to mock getName() which is final
|
||||
}
|
@ -12,7 +12,6 @@
|
||||
namespace Symfony\Component\HttpKernel\Tests;
|
||||
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
@ -724,7 +723,7 @@ EOF;
|
||||
protected function getBundle($dir = null, $parent = null, $className = null, $bundleName = null)
|
||||
{
|
||||
$bundle = $this
|
||||
->getMockBuilder('Symfony\Component\HttpKernel\Tests\BundleForTest')
|
||||
->getMockBuilder('Symfony\Component\HttpKernel\Tests\Fixtures\TestBundle')
|
||||
->setMethods(array('getPath', 'getParent', 'getName'))
|
||||
->disableOriginalConstructor()
|
||||
;
|
||||
@ -775,8 +774,3 @@ EOF;
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
abstract class BundleForTest implements BundleInterface
|
||||
{
|
||||
// We can not extend Symfony\Component\HttpKernel\Bundle\Bundle as we want to mock getName() which is final
|
||||
}
|
||||
|
Reference in New Issue
Block a user