Skip to content

Commit

Permalink
test: Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
chapterjason committed Aug 2, 2021
1 parent 424499c commit 2826783
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions tests/Functional/BundleRoutingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,34 @@

namespace Nyholm\BundleTest\Tests\Functional;

use Nyholm\BundleTest\BaseBundleTestCase;
use Nyholm\BundleTest\AppKernel;
use Nyholm\BundleTest\Tests\Fixtures\ConfigurationBundle\ConfigurationBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\Routing\RouterInterface;

class BundleRoutingTest extends BaseBundleTestCase
class BundleRoutingTest extends KernelTestCase
{
protected static function createKernel(array $options = [])
{
KernelTestCase::$class = AppKernel::class;

/**
* @var AppKernel $kernel
*/
$kernel = parent::createKernel($options);
$kernel->handleOptions($options);

return $kernel;
}

public function testSetRoutingFile()
{
$this->setRoutingFile(__DIR__.'/../Fixtures/Resources/Routing/routes.yml');
self::bootKernel([
'routingFile' => __DIR__.'/../Fixtures/Resources/Routing/routes.yml',
]);

$this->bootKernel();
$container = $this->getContainer();
$container = self::getContainer();
$container = $container->get('test.service_container');
/**
* @var RouterInterface $router
Expand Down

0 comments on commit 2826783

Please sign in to comment.