Skip to content

Commit 6e8d0e0

Browse files
committed
Fixes broken tests from symfony/console upgrade
1 parent 35b81a8 commit 6e8d0e0

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/Commands/ValidateCommandStdinOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private function makeAppWithCommand(string $stdinContent): array
4444
new Validator(new Archive($this->temporaryDirectory)),
4545
$fakeInputReader
4646
);
47-
$application->add($command);
47+
$application->addCommand($command);
4848

4949
return [$application, $command];
5050
}

tests/Commands/ValidateCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,7 +2301,7 @@ public function detectsNonGitattributeContentInStdinInput(): void
23012301
$fakeInputReader
23022302
);
23032303

2304-
$application->add($analyserCommand);
2304+
$application->addCommand($analyserCommand);
23052305
$command = $application->find('validate');
23062306

23072307
$expectedDisplay = <<<CONTENT
@@ -2356,7 +2356,7 @@ public function detectsValidGitattributeContentInStdinInput(): void
23562356
$fakeInputReader
23572357
);
23582358

2359-
$application->add($analyserCommand);
2359+
$application->addCommand($analyserCommand);
23602360
$command = $application->find('validate');
23612361

23622362
$expectedDisplay = <<<CONTENT
@@ -2444,7 +2444,7 @@ protected function getApplicationWithMockedAnalyser(MockInterface $mockedAnalyse
24442444
new FakeInputReader()
24452445
);
24462446

2447-
$application->add($analyserCommand);
2447+
$application->addCommand($analyserCommand);
24482448

24492449
return $application;
24502450
}
@@ -2463,7 +2463,7 @@ protected function getApplicationWithMockedArchiveValidator(MockInterface $mocke
24632463
new FakeInputReader()
24642464
);
24652465

2466-
$application->add($analyserCommand);
2466+
$application->addCommand($analyserCommand);
24672467

24682468
return $application;
24692469
}

tests/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ protected function createTemporaryGlobPatternFile($content)
153153
protected function getApplication(Command $command): Application
154154
{
155155
$application = new Application();
156-
$application->add($command);
156+
$application->addCommand($command);
157157

158158
return $application;
159159
}

0 commit comments

Comments
 (0)