mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-08 21:05:37 +00:00
bug #4970 Name the IntegrationTestCase data providers provideTests() and provideLegacyTests() like on 3.x (fabpot)
This PR was merged into the 4.x branch.
Discussion
----------
Name the IntegrationTestCase data providers provideTests() and provideLegacyTests() like on 3.x
Commits
-------
cc77836470 Name the IntegrationTestCase data providers provideTests() and provideLegacyTests() like on 3.x
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
* Remove the obsolete `Twig\Test\NodeTestCase::getTests()` method; override `provideTests()` instead
|
||||
* Make `Twig\Markup` final
|
||||
* Remove `getDeprecatingPackage()`, `getDeprecatedVersion()`, and `getAlternative()` from `Twig\TwigCallableInterface` and `Twig\AbstractTwigCallable`; use `Twig\AbstractTwigCallable::triggerDeprecation()` instead
|
||||
* Remove the `Twig\Test\IntegrationTestCase::getTests()` and `getLegacyTests()` data providers; use `provideTests()` and `provideLegacyTests()` instead
|
||||
* Add native return types to the protected extension points in `Twig\Test\IntegrationTestCase` and `Twig\Test\NodeTestCase` and require overriding methods to declare compatible return types
|
||||
* Remove `TemplateVariable` and `AssignTemplateVariable`; use `MacroVariable` and `AssignMacroVariable` instead
|
||||
* Add the `isAlwaysAllowedInSandbox()` method to `Twig\TwigCallableInterface` and `Twig\TokenParser\TokenParserInterface`
|
||||
|
||||
@@ -108,13 +108,13 @@ abstract class IntegrationTestCase extends TestCase
|
||||
return [];
|
||||
}
|
||||
|
||||
#[DataProvider('getTests')]
|
||||
#[DataProvider('provideTests')]
|
||||
public function testIntegration($file, $message, $condition, $templates, $exception, $outputs, $deprecation = ''): void
|
||||
{
|
||||
$this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation);
|
||||
}
|
||||
|
||||
#[DataProvider('getLegacyTests'), Group('legacy'), IgnoreDeprecations]
|
||||
#[DataProvider('provideLegacyTests'), Group('legacy'), IgnoreDeprecations]
|
||||
public function testLegacyIntegration($file, $message, $condition, $templates, $exception, $outputs, $deprecation = ''): void
|
||||
{
|
||||
$this->doIntegrationTest($file, $message, $condition, $templates, $exception, $outputs, $deprecation);
|
||||
@@ -166,12 +166,12 @@ abstract class IntegrationTestCase extends TestCase
|
||||
return $tests;
|
||||
}
|
||||
|
||||
final public static function getTests(): array
|
||||
final public static function provideTests(): array
|
||||
{
|
||||
return self::assembleTests(false);
|
||||
}
|
||||
|
||||
final public static function getLegacyTests(): array
|
||||
final public static function provideLegacyTests(): array
|
||||
{
|
||||
return self::assembleTests(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user