Skip to content

Commit af1f2fd

Browse files
minor #61390 run tests with PHPUnit 12.3 (xabbuh)
This PR was merged into the 7.4 branch. Discussion ---------- run tests with PHPUnit 12.3 | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT The test updates reflect the following changes in PHPUnit 12.2 and 12.3: - a warning is emitted when a data provider provides data sets that have more values than the test method consuming the data set - the format in which data sets are displayed in test reports has changed affecting the modified test in the PhpUnitBridge (see sebastianbergmann/phpunit#6272) - errors triggered in the `tearDown()` method of skipped tests are no longer silence affecting the modified tests in the Form component where the `$defaultLocale` property is not initialised (see sebastianbergmann/phpunit#6281) Commits ------- cf7e41e1092 run tests with PHPUnit 12.3
2 parents 6efbca9 + 060b6e6 commit af1f2fd

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

Tests/Console/Descriptor/AbstractDescriptorTestCase.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ protected function tearDown(): void
4343
}
4444

4545
#[DataProvider('getDescribeRouteCollectionTestData')]
46-
public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription)
46+
public function testDescribeRouteCollection(RouteCollection $routes, $expectedDescription, $file)
4747
{
4848
$this->assertDescription($expectedDescription, $routes);
4949
}
@@ -54,7 +54,7 @@ public static function getDescribeRouteCollectionTestData(): array
5454
}
5555

5656
#[DataProvider('getDescribeRouteCollectionWithHttpMethodFilterTestData')]
57-
public function testDescribeRouteCollectionWithHttpMethodFilter(string $httpMethod, RouteCollection $routes, $expectedDescription)
57+
public function testDescribeRouteCollectionWithHttpMethodFilter(string $httpMethod, RouteCollection $routes, $expectedDescription, $file)
5858
{
5959
$this->assertDescription($expectedDescription, $routes, ['method' => $httpMethod]);
6060
}
@@ -69,7 +69,7 @@ public static function getDescribeRouteCollectionWithHttpMethodFilterTestData():
6969
}
7070

7171
#[DataProvider('getDescribeRouteTestData')]
72-
public function testDescribeRoute(Route $route, $expectedDescription)
72+
public function testDescribeRoute(Route $route, $expectedDescription, $file)
7373
{
7474
$this->assertDescription($expectedDescription, $route);
7575
}
@@ -80,7 +80,7 @@ public static function getDescribeRouteTestData(): array
8080
}
8181

8282
#[DataProvider('getDescribeContainerParametersTestData')]
83-
public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription)
83+
public function testDescribeContainerParameters(ParameterBag $parameters, $expectedDescription, $file)
8484
{
8585
$this->assertDescription($expectedDescription, $parameters);
8686
}
@@ -91,7 +91,7 @@ public static function getDescribeContainerParametersTestData(): array
9191
}
9292

9393
#[DataProvider('getDescribeContainerBuilderTestData')]
94-
public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options)
94+
public function testDescribeContainerBuilder(ContainerBuilder $builder, $expectedDescription, array $options, $file)
9595
{
9696
$this->assertDescription($expectedDescription, $builder, $options);
9797
}
@@ -102,7 +102,7 @@ public static function getDescribeContainerBuilderTestData(): array
102102
}
103103

104104
#[DataProvider('getDescribeContainerExistingClassDefinitionTestData')]
105-
public function testDescribeContainerExistingClassDefinition(Definition $definition, $expectedDescription)
105+
public function testDescribeContainerExistingClassDefinition(Definition $definition, $expectedDescription, $file)
106106
{
107107
$this->assertDescription($expectedDescription, $definition);
108108
}
@@ -113,7 +113,7 @@ public static function getDescribeContainerExistingClassDefinitionTestData(): ar
113113
}
114114

115115
#[DataProvider('getDescribeContainerDefinitionTestData')]
116-
public function testDescribeContainerDefinition(Definition $definition, $expectedDescription)
116+
public function testDescribeContainerDefinition(Definition $definition, $expectedDescription, $file)
117117
{
118118
$this->assertDescription($expectedDescription, $definition);
119119
}
@@ -124,7 +124,7 @@ public static function getDescribeContainerDefinitionTestData(): array
124124
}
125125

126126
#[DataProvider('getDescribeContainerDefinitionWithArgumentsShownTestData')]
127-
public function testDescribeContainerDefinitionWithArgumentsShown(Definition $definition, $expectedDescription)
127+
public function testDescribeContainerDefinitionWithArgumentsShown(Definition $definition, $expectedDescription, $file)
128128
{
129129
$this->assertDescription($expectedDescription, $definition, []);
130130
}
@@ -144,7 +144,7 @@ public static function getDescribeContainerDefinitionWithArgumentsShownTestData(
144144
}
145145

146146
#[DataProvider('getDescribeContainerAliasTestData')]
147-
public function testDescribeContainerAlias(Alias $alias, $expectedDescription)
147+
public function testDescribeContainerAlias(Alias $alias, $expectedDescription, $file)
148148
{
149149
$this->assertDescription($expectedDescription, $alias);
150150
}
@@ -155,7 +155,7 @@ public static function getDescribeContainerAliasTestData(): array
155155
}
156156

157157
#[DataProvider('getDescribeContainerDefinitionWhichIsAnAliasTestData')]
158-
public function testDescribeContainerDefinitionWhichIsAnAlias(Alias $alias, $expectedDescription, ContainerBuilder $builder, $options = [])
158+
public function testDescribeContainerDefinitionWhichIsAnAlias(Alias $alias, $expectedDescription, ContainerBuilder $builder, $options = [], $file = null)
159159
{
160160
$this->assertDescription($expectedDescription, $builder, $options);
161161
}
@@ -191,7 +191,7 @@ public static function getDescribeContainerDefinitionWhichIsAnAliasTestData(): a
191191
#[IgnoreDeprecations]
192192
#[Group('legacy')]
193193
#[DataProvider('getDescribeContainerParameterTestData')]
194-
public function testDescribeContainerParameter($parameter, $expectedDescription, array $options)
194+
public function testDescribeContainerParameter($parameter, $expectedDescription, array $options, $file)
195195
{
196196
$this->assertDescription($expectedDescription, $parameter, $options);
197197
}
@@ -214,7 +214,7 @@ public static function getDescribeContainerParameterTestData(): array
214214
}
215215

216216
#[DataProvider('getDescribeEventDispatcherTestData')]
217-
public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options)
217+
public function testDescribeEventDispatcher(EventDispatcher $eventDispatcher, $expectedDescription, array $options, $file)
218218
{
219219
$this->assertDescription($expectedDescription, $eventDispatcher, $options);
220220
}
@@ -225,7 +225,7 @@ public static function getDescribeEventDispatcherTestData(): array
225225
}
226226

227227
#[DataProvider('getDescribeCallableTestData')]
228-
public function testDescribeCallable($callable, $expectedDescription)
228+
public function testDescribeCallable($callable, $expectedDescription, $file)
229229
{
230230
$this->assertDescription($expectedDescription, $callable);
231231
}
@@ -238,7 +238,7 @@ public static function getDescribeCallableTestData(): array
238238
#[IgnoreDeprecations]
239239
#[Group('legacy')]
240240
#[DataProvider('getDescribeDeprecatedCallableTestData')]
241-
public function testDescribeDeprecatedCallable($callable, $expectedDescription)
241+
public function testDescribeDeprecatedCallable($callable, $expectedDescription, $file)
242242
{
243243
$this->assertDescription($expectedDescription, $callable);
244244
}
@@ -265,7 +265,7 @@ public static function getClassDescriptionTestData(): array
265265
}
266266

267267
#[DataProvider('getDeprecationsTestData')]
268-
public function testGetDeprecations(ContainerBuilder $builder, $expectedDescription)
268+
public function testGetDeprecations(ContainerBuilder $builder, $expectedDescription, $file)
269269
{
270270
$this->assertDescription($expectedDescription, $builder, ['deprecations' => true]);
271271
}

Tests/Console/Descriptor/TextDescriptorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ public static function getDescribeRouteWithControllerLinkTestData()
4747
}
4848

4949
#[DataProvider('getDescribeRouteWithControllerLinkTestData')]
50-
public function testDescribeRouteWithControllerLink(Route $route, $expectedDescription)
50+
public function testDescribeRouteWithControllerLink(Route $route, $expectedDescription, $file)
5151
{
5252
static::$fileLinkFormatter = new FileLinkFormatter('myeditor://open?file=%f&line=%l');
53-
parent::testDescribeRoute($route, str_replace('[:file:]', __FILE__, $expectedDescription));
53+
parent::testDescribeRoute($route, str_replace('[:file:]', __FILE__, $expectedDescription), $file);
5454
}
5555
}
5656

0 commit comments

Comments
 (0)