From 5fcc26c40a0aaafcb1d878d06e9615a23fdf4219 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Wed, 24 Apr 2024 19:57:24 +0200 Subject: [PATCH] Tests: fix test failure PHPUnit being finicky with yet another deprecation. Either way, this fixes it. --- tests/Unit/Errors/ParallelLintErrorTest.php | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/Unit/Errors/ParallelLintErrorTest.php b/tests/Unit/Errors/ParallelLintErrorTest.php index db69b55..c5b3cba 100644 --- a/tests/Unit/Errors/ParallelLintErrorTest.php +++ b/tests/Unit/Errors/ParallelLintErrorTest.php @@ -67,10 +67,25 @@ public function testGetFilePath($filePath) $this->assertSame($filePath, $error->getFilePath()); } + /** + * Data provider. + * + * @return array + */ + public static function dataGetFilePath() + { + $data = self::dataGetShortFilePath(); + foreach ($data as $name => $params) { + unset($data[$name]['expectedShort']); + } + + return $data; + } + /** * Test retrieving the short file path. * - * @dataProvider dataGetFilePath + * @dataProvider dataGetShortFilePath * * @param string $filePath The file path input to run the test with. * @param string $expectedShort The expected method return value. @@ -88,7 +103,7 @@ public function testGetShortFilePath($filePath, $expectedShort) * * @return array */ - public static function dataGetFilePath() + public static function dataGetShortFilePath() { $cwd = getcwd();