From d70362aa68a7ec600f5017f41f17d23ca2852bff Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Thu, 26 Sep 2024 17:39:37 +1200 Subject: [PATCH] API Update API to reflect changes to CLI interaction (#97) --- tests/Extensions/CheckComposerUpdatesExtensionTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Extensions/CheckComposerUpdatesExtensionTest.php b/tests/Extensions/CheckComposerUpdatesExtensionTest.php index f4fc530..b93928b 100644 --- a/tests/Extensions/CheckComposerUpdatesExtensionTest.php +++ b/tests/Extensions/CheckComposerUpdatesExtensionTest.php @@ -12,6 +12,8 @@ use SilverStripe\Core\Config\Config; use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\SapphireTest; +use SilverStripe\PolyExecution\PolyOutput; +use Symfony\Component\Console\Input\ArrayInput; /** * @mixin PHPUnit_Framework_TestCase @@ -80,7 +82,10 @@ public function testOnlyAllowedPackageTypesAreProcessed() protected function runTask() { ob_start(); - $this->task->run(null); + $output = PolyOutput::create(PolyOutput::FORMAT_ANSI); + $input = new ArrayInput([]); + $input->setInteractive(false); + $this->task->run($input, $output); return ob_get_clean(); } }