Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e80e193
commit 9850f7d
Showing
4 changed files
with
83 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?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\Bundle\FrameworkBundle\Test; | ||
|
||
use PHPUnit\Runner\Version; | ||
|
||
if (class_exists(Version::class) && version_compare(Version::id(), '8.0.0') >= 0) { | ||
class_alias(KernelTestCaseNew::class, KernelTestCase::class, true); | ||
} else { | ||
class_alias(KernelTestCaseOld::class, KernelTestCase::class, true); | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCaseNew.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?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\Bundle\FrameworkBundle\Test; | ||
|
||
/** | ||
* KernelTestCaseNew is the base class for tests needing a Kernel >= PHPUNIT 8. | ||
* | ||
* @author Fabien Potencier <fabien@symfony.com> | ||
* | ||
* @internal | ||
*/ | ||
abstract class KernelTestCaseNew extends BaseKernelTestCase | ||
{ | ||
/** | ||
* Clean up Kernel usage in this test. | ||
*/ | ||
protected function tearDown(): void | ||
{ | ||
static::ensureKernelShutdown(); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCaseOld.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?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\Bundle\FrameworkBundle\Test; | ||
|
||
/** | ||
* KernelTestCaseOld is the base class for tests needing a Kernel <= PHPUNIT 7. | ||
* | ||
* @author Fabien Potencier <fabien@symfony.com> | ||
* | ||
* @internal | ||
*/ | ||
abstract class KernelTestCaseOld extends BaseKernelTestCase | ||
{ | ||
/** | ||
* Clean up Kernel usage in this test. | ||
*/ | ||
protected function tearDown() | ||
{ | ||
static::ensureKernelShutdown(); | ||
} | ||
} |