Skip to content

Commit

Permalink
Use nyholm/symfony-bundle-test 2.0 (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored Apr 5, 2022
1 parent b2f25c5 commit b7151db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"symfony/http-kernel": "^5.4 || ^6.0"
},
"require-dev": {
"nyholm/symfony-bundle-test": "dev-clear-cache",
"nyholm/symfony-bundle-test": "^2.0",
"symfony/phpunit-bridge": "^6.0"
},
"minimum-stability": "dev",
Expand Down
7 changes: 4 additions & 3 deletions tests/Functional/BundleInitializationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Happyr\ServiceMocking\HappyrServiceMockingBundle;
use Happyr\ServiceMocking\ServiceMock;
use Happyr\ServiceMocking\Tests\Resource\ExampleService;
use Happyr\ServiceMocking\Tests\Resource\Kernel;
use Happyr\ServiceMocking\Tests\Resource\ServiceWithFactory;
use Happyr\ServiceMocking\Tests\Resource\StatefulService;
use Nyholm\BundleTest\TestKernel;
use ProxyManager\Proxy\VirtualProxyInterface;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\HttpKernel\KernelInterface;
Expand All @@ -18,7 +18,7 @@ class BundleInitializationTest extends KernelTestCase
{
protected static function getKernelClass(): string
{
return Kernel::class;
return TestKernel::class;
}

protected static function createKernel(array $options = []): KernelInterface
Expand All @@ -27,9 +27,10 @@ protected static function createKernel(array $options = []): KernelInterface
return static::$kernel;
}
/**
* @var Kernel $kernel
* @var TestKernel $kernel
*/
$kernel = parent::createKernel($options);
$kernel->setClearCacheAfterShutdown(false);
$kernel->addTestBundle(HappyrServiceMockingBundle::class);
$configFile = $options['config_file'] ?? 'config.yml';
$kernel->addTestConfig(__DIR__.'/'.$configFile);
Expand Down
13 changes: 0 additions & 13 deletions tests/Resource/Kernel.php

This file was deleted.

0 comments on commit b7151db

Please sign in to comment.