Skip to content

Commit bfd277d

Browse files
authored
tests: fix test app compat (#593)
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent 6a54048 commit bfd277d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/Integration/CommandTestCase.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ abstract class CommandTestCase extends TestCase
3434
protected static function make_app(Command $command): Application
3535
{
3636
$app = new Application();
37-
$app->add($command);
37+
if (method_exists($app, 'addCommand')) {
38+
$app->addCommand($command);
39+
} else {
40+
$app->add($command);
41+
}
3842
$app->setAutoExit(false);
3943

4044
return $app;

0 commit comments

Comments
 (0)