diff --git a/tests/DemosHttpTest.php b/tests/DemosHttpTest.php index 38f3d4776d..8d34fd5d3a 100644 --- a/tests/DemosHttpTest.php +++ b/tests/DemosHttpTest.php @@ -115,7 +115,7 @@ protected function getPathWithAppVars(string $path): string } /** - * @dataProvider demoLateOutputErrorProvider + * @dataProvider provideDemoLateOutputErrorCases */ public function testDemoLateOutputError(string $urlTrigger, string $expectedOutput): void { @@ -128,7 +128,7 @@ public function testDemoLateOutputError(string $urlTrigger, string $expectedOutp self::assertSame($expectedOutput, $response->getBody()->getContents()); } - public function demoLateOutputErrorProvider(): array + public function provideDemoLateOutputErrorCases(): array { $hOutput = "\n" . '!! FATAL UI ERROR: Headers already sent, more headers cannot be set at this stage !!' . "\n"; $oOutput = 'unmanaged output' . "\n" . '!! FATAL UI ERROR: Unexpected output detected !!' . "\n"; diff --git a/tests/DemosTest.php b/tests/DemosTest.php index f46b8f2bae..af84492149 100644 --- a/tests/DemosTest.php +++ b/tests/DemosTest.php @@ -258,7 +258,7 @@ protected function getPathWithAppVars(string $path): string /** @var string */ protected $regexSse = '~^(id|event|data).*$~m'; - public function demoFilesProvider(): array + public function provideDemosStatusAndHtmlResponseCases(): array { $excludeDirs = ['_demo-data', '_includes']; $excludeFiles = ['_unit-test/stream.php', 'layout/layouts_error.php']; @@ -301,7 +301,7 @@ public function demoFilesProvider(): array } /** - * @dataProvider demoFilesProvider + * @dataProvider provideDemosStatusAndHtmlResponseCases */ public function testDemosStatusAndHtmlResponse(string $path): void { @@ -323,7 +323,7 @@ public function testDemoResponseError(): void self::assertStringContainsString('Property for specified object is not defined', $response->getBody()->getContents()); } - public function casesDemoGetProvider(): array + public function provideDemoGetCases(): array { $files = []; $files[] = ['others/sticky.php?xx=YEY']; @@ -334,7 +334,7 @@ public function casesDemoGetProvider(): array } /** - * @dataProvider casesDemoGetProvider + * @dataProvider provideDemoGetCases */ public function testDemoGet(string $path): void { @@ -399,7 +399,7 @@ public function testWizard(): void /** * Test reload and loader callback. */ - public function jsonResponseProvider(): array + public function provideDemoAssertJsonResponseCases(): array { $files = []; // simple reload @@ -414,7 +414,7 @@ public function jsonResponseProvider(): array } /** - * @dataProvider jsonResponseProvider + * @dataProvider provideDemoAssertJsonResponseCases */ public function testDemoAssertJsonResponse(string $path, string $expectedExceptionMessage = null): void { @@ -444,7 +444,7 @@ public function testDemoAssertJsonResponse(string $path, string $expectedExcepti /** * Test JsSse and Console. */ - public function sseResponseProvider(): array + public function provideDemoAssertSseResponseCases(): array { $files = []; $files[] = ['_unit-test/sse.php?' . Callback::URL_QUERY_TRIGGER_PREFIX . 'see_test=ajax&' . Callback::URL_QUERY_TARGET . '=1&__atk_sse=1']; @@ -456,7 +456,7 @@ public function sseResponseProvider(): array } /** - * @dataProvider sseResponseProvider + * @dataProvider provideDemoAssertSseResponseCases */ public function testDemoAssertSseResponse(string $path): void { @@ -484,7 +484,7 @@ public function testDemoAssertSseResponse(string $path): void } } - public function jsonResponsePostProvider(): array + public function provideDemoAssertJsonResponsePostCases(): array { $files = []; $files[] = [ @@ -498,7 +498,7 @@ public function jsonResponsePostProvider(): array } /** - * @dataProvider jsonResponsePostProvider + * @dataProvider provideDemoAssertJsonResponsePostCases */ public function testDemoAssertJsonResponsePost(string $path, array $postData): void { @@ -508,7 +508,7 @@ public function testDemoAssertJsonResponsePost(string $path, array $postData): v } /** - * @dataProvider demoCallbackErrorProvider + * @dataProvider provideDemoCallbackErrorCases */ public function testDemoCallbackError(string $path, string $expectedExceptionMessage): void { @@ -524,7 +524,7 @@ public function testDemoCallbackError(string $path, string $expectedExceptionMes self::assertStringContainsString($expectedExceptionMessage, $responseBodyStr); } - public function demoCallbackErrorProvider(): array + public function provideDemoCallbackErrorCases(): array { return [ [ diff --git a/tests/PaginatorTest.php b/tests/PaginatorTest.php index 438d92e77b..56991590b9 100644 --- a/tests/PaginatorTest.php +++ b/tests/PaginatorTest.php @@ -9,7 +9,7 @@ class PaginatorTest extends TestCase { - public function addDataProvider(): array + public function providePaginatorCases(): array { return [ [1, 1, 1, [1]], @@ -34,7 +34,7 @@ public function addDataProvider(): array } /** - * @dataProvider addDataProvider + * @dataProvider providePaginatorCases */ public function testPaginator(int $page, int $range, int $total, array $expected): void { diff --git a/tests/ViewTest.php b/tests/ViewTest.php index b778e25414..fa3d6949cf 100644 --- a/tests/ViewTest.php +++ b/tests/ViewTest.php @@ -154,7 +154,7 @@ public function testSetException(): void /** * @param class-string $class * - * @dataProvider setNotClosureProvider + * @dataProvider provideSetNotClosureErrorCases */ public function testSetNotClosureError(string $class): void { @@ -168,7 +168,7 @@ public function testSetNotClosureError(string $class): void /** * @return list>> */ - public function setNotClosureProvider(): array + public function provideSetNotClosureErrorCases(): array { return [ [Console::class], @@ -186,7 +186,7 @@ public function setNotClosureProvider(): array * * @param class-string $class * - * @dataProvider setNotOneArgumentExceptionProvider + * @dataProvider provideSetNotOneArgumentExceptionCases */ public function testSetNotOneArgumentException(string $class): void { @@ -200,7 +200,7 @@ public function testSetNotOneArgumentException(string $class): void /** * @return list>> */ - public function setNotOneArgumentExceptionProvider(): array + public function provideSetNotOneArgumentExceptionCases(): array { return [ [View::class],