File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace WebProject \Codeception \Module \AiReporter \Tests \Unit ;
6+
7+ use PHPUnit \Framework \TestCase ;
8+
9+ /**
10+ * Validates that escaping a percent sign as `%%` works around the Codeception 5
11+ * upstream ArgumentCountError in `Codeception\Reporter\ReportPrinter` using the
12+ * `--report` cli flag.
13+ */
14+ class ReportPrinterSprintfBugTest extends TestCase
15+ {
16+ /**
17+ * @dataProvider provideEscapedPercentInNameCases
18+ */
19+ public function testEscapedPercentInName (int $ value ): void
20+ {
21+ self ::assertSame (1 , $ value );
22+ }
23+
24+ /**
25+ * @return array<string, array<int>>
26+ */
27+ public static function provideEscapedPercentInNameCases (): iterable
28+ {
29+ return [
30+ // The %% is rendered as % by the Codeception ReportPrinter sprintf
31+ '100%% safely escaped ' => [1 ],
32+ ];
33+ }
34+ }
You can’t perform that action at this time.
0 commit comments