Skip to content

Commit c9548fb

Browse files
committed
minor: fix tests
1 parent d90bad9 commit c9548fb

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"symfony/panther": "^1.1|^2.0.1",
3232
"symfony/phpunit-bridge": "^6.0|^7.0",
3333
"symfony/security-bundle": "^5.4|^6.0|^7.0",
34-
"zenstruck/foundry": "^1.30"
34+
"zenstruck/foundry": "^1.30,<1.35"
3535
},
3636
"suggest": {
3737
"justinrainbow/json-schema": "Json schema validator. Needed to use Json::assertMatchesSchema().",

tests/NormalizationTest.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public static function namesProvider(): \Generator
4242
$baseTemplate = 'error_'.__METHOD__;
4343

4444
yield 'test name without datasets' => [
45-
'test name' => __METHOD__,
46-
'expected output' => \strtr($baseTemplate, '\\:', '-_').'__0',
45+
'testName' => __METHOD__,
46+
'expectedOutput' => \strtr($baseTemplate, '\\:', '-_').'__0',
4747
];
4848

4949
$datasetTemplate = $baseTemplate.'__data-set-%s__0';
@@ -55,49 +55,49 @@ public static function namesProvider(): \Generator
5555
$numericOutput = \strtr($numericTemplate, '\\:', '-_');
5656

5757
yield 'phpunit 10 alpha' => [
58-
'test name' => __METHOD__.' with data set "test set"',
59-
'expected output' => $alphaOutput,
58+
'testName' => __METHOD__.' with data set "test set"',
59+
'expectedOutput' => $alphaOutput,
6060
];
6161
yield 'phpunit 10 numeric' => [
62-
'test name' => __METHOD__.' with data set #0',
63-
'expected output' => $numericOutput,
62+
'testName' => __METHOD__.' with data set #0',
63+
'expectedOutput' => $numericOutput,
6464
];
6565
yield 'legacy alpha' => [
66-
'test name' => __METHOD__.' with data set "test set" (test set)',
67-
'expected output' => $alphaOutput,
66+
'testName' => __METHOD__.' with data set "test set" (test set)',
67+
'expectedOutput' => $alphaOutput,
6868
];
6969
yield 'legacy numeric' => [
70-
'test name' => __METHOD__.' with data set #0 (test set)',
71-
'expected output' => $numericOutput,
70+
'testName' => __METHOD__.' with data set #0 (test set)',
71+
'expectedOutput' => $numericOutput,
7272
];
7373
}
7474

7575
public static function edgeCaseTestNames(): \Generator
7676
{
7777
$baseTemplate = \strtr('error_'.__METHOD__.'__data-set-', '\\:', '-_');
7878
yield 'self within moustache' => [
79-
'test name' => __METHOD__.' with data set "te{{self}}st" (test set)',
80-
'expected output' => $baseTemplate.'te-self-st__0',
79+
'testName' => __METHOD__.' with data set "te{{self}}st" (test set)',
80+
'expectedOutput' => $baseTemplate.'te-self-st__0',
8181
];
8282
yield 'double quoted with space' => [
83-
'test name' => __METHOD__.' with data set "_self.env.setCache("uri://host.net:2121") _self.env.loadTemplate("other-host")" (test set)',
84-
'expected output' => $baseTemplate.'_self-env-setCache-uri-host-net-2121-_self-env-loadTemplate-other-host-__0',
83+
'testName' => __METHOD__.' with data set "_self.env.setCache("uri://host.net:2121") _self.env.loadTemplate("other-host")" (test set)',
84+
'expectedOutput' => $baseTemplate.'_self-env-setCache-uri-host-net-2121-_self-env-loadTemplate-other-host-__0',
8585
];
8686
yield 'double quotes in moustache' => [
87-
'test name' => __METHOD__.' with data set "te{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}st"',
88-
'expected output' => $baseTemplate.'te-_self-env-registerUndefinedFilterCallback-exec-_self-env-getFilter-id-st__0',
87+
'testName' => __METHOD__.' with data set "te{{_self.env.registerUndefinedFilterCallback("exec")}}{{_self.env.getFilter("id")}}st"',
88+
'expectedOutput' => $baseTemplate.'te-_self-env-registerUndefinedFilterCallback-exec-_self-env-getFilter-id-st__0',
8989
];
9090
yield 'escaped simple quote' => [
91-
'test name' => __METHOD__.' with data set "te{{\'/etc/passwd\'|file_excerpt(1,30)}}st"',
92-
'expected output' => $baseTemplate.'te-etc-passwd-file_excerpt-1-30-st__0',
91+
'testName' => __METHOD__.' with data set "te{{\'/etc/passwd\'|file_excerpt(1,30)}}st"',
92+
'expectedOutput' => $baseTemplate.'te-etc-passwd-file_excerpt-1-30-st__0',
9393
];
9494
yield 'single quote for array index access' => [
95-
'test name' => __METHOD__.' with data set "te{{[\'id\']|filter(\'system\')}}st"',
96-
'expected output' => $baseTemplate.'te-id-filter-system-st__0',
95+
'testName' => __METHOD__.' with data set "te{{[\'id\']|filter(\'system\')}}st"',
96+
'expectedOutput' => $baseTemplate.'te-id-filter-system-st__0',
9797
];
9898
yield 'numeric array access' => [
99-
'test name' => __METHOD__.' with data set "te{{[0]|reduce(\'system\',\'id\')}}st"',
100-
'expected output' => $baseTemplate.'te-0-reduce-system-id-st__0',
99+
'testName' => __METHOD__.' with data set "te{{[0]|reduce(\'system\',\'id\')}}st"',
100+
'expectedOutput' => $baseTemplate.'te-0-reduce-system-id-st__0',
101101
];
102102
}
103103
}

0 commit comments

Comments
 (0)