From 05f7c2b60942ca0cff79f6dddc79324a884e453c Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 31 Oct 2024 12:00:00 +0000 Subject: [PATCH] Pass the correct values to the next command in the ...chain --- src/Command/RemoveIgnoredFilesCommand.php | 2 +- tests/Kernel/Command/RemoveIgnoredFilesCommandTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Command/RemoveIgnoredFilesCommand.php b/src/Command/RemoveIgnoredFilesCommand.php index 6c2eea6..07728db 100644 --- a/src/Command/RemoveIgnoredFilesCommand.php +++ b/src/Command/RemoveIgnoredFilesCommand.php @@ -29,6 +29,6 @@ final class RemoveIgnoredFilesCommand return !collect($this->filenames)->contains($templateFile->name); }); - return $next([$configurationDataDto, $filesToGenerate]); + return $next([$configurationData, $configurationDataDto, $filesToGenerate]); } } diff --git a/tests/Kernel/Command/RemoveIgnoredFilesCommandTest.php b/tests/Kernel/Command/RemoveIgnoredFilesCommandTest.php index 3a51f39..edd4a74 100644 --- a/tests/Kernel/Command/RemoveIgnoredFilesCommandTest.php +++ b/tests/Kernel/Command/RemoveIgnoredFilesCommandTest.php @@ -18,8 +18,8 @@ class RemoveIgnoredFilesCommandTest extends KernelTestCase $command = new RemoveIgnoredFilesCommand($filenamesToIgnore); $command->execute([[], [], $filenamesToGenerate], function ($result) { - self::assertCount(1, $result[1]); - self::assertSame('phpcs.xml.dist', $result[1][0]->name); + self::assertCount(1, $result[2]); + self::assertSame('phpcs.xml.dist', $result[2][0]->name); }); } }