diff --git a/tests/php/Model/LocalDateTimeTest.php b/tests/php/Model/LocalDateTimeTest.php index 65ff7b2a..b0c6ea32 100644 --- a/tests/php/Model/LocalDateTimeTest.php +++ b/tests/php/Model/LocalDateTimeTest.php @@ -88,19 +88,19 @@ public static function provideTestSwitchLocales() return [ [ 'locale' => 'en_NZ', - 'localTIme' => '2021-01-13 02:00:12', + 'expectedTime' => '2021-01-13 02:00:12', ], [ 'locale' => 'en_AU', - 'localTime' => '2021-01-12 23:00:12', + 'expectedTime' => '2021-01-12 23:00:12', ], [ 'locale' => 'es_ES', - 'localTime' => '2021-01-12 14:00:12', + 'expectedTime' => '2021-01-12 14:00:12', ], [ 'locale' => 'es_US', - 'localTime' => '2021-01-12 08:00:12', + 'expectedTime' => '2021-01-12 08:00:12', ], ]; } diff --git a/tests/php/Task/InitialPageLocalisationTaskTest.php b/tests/php/Task/InitialPageLocalisationTaskTest.php index b54a01d9..f6b714b9 100644 --- a/tests/php/Task/InitialPageLocalisationTaskTest.php +++ b/tests/php/Task/InitialPageLocalisationTaskTest.php @@ -11,6 +11,7 @@ use TractorCow\Fluent\State\FluentState; use TractorCow\Fluent\Task\InitialPageLocalisationTask; use PHPUnit\Framework\Attributes\DataProvider; +use Symfony\Component\Console\Input\InputDefinition; class InitialPageLocalisationTaskTest extends SapphireTest { @@ -69,17 +70,18 @@ public function testInitialPageLocalisation(bool $publish, int $limit, array $lo $pages = $this->getLocalisedPages(); $this->assertCount(0, $pages); - $getParams = [ - 'publish' => $publish, - 'limit' => $limit, + $options = [ + '--publish' => $publish, + '--limit' => $limit, ]; // Localise pages $task = InitialPageLocalisationTask::singleton(); $buffer = new BufferedOutput(); $output = new PolyOutput(PolyOutput::FORMAT_ANSI, wrappedOutput: $buffer); - $input = new ArrayInput($getParams); + $input = new ArrayInput($options); $input->setInteractive(false); + $input->bind(new InputDefinition($task->getOptions())); $task->run($input, $output); // Check localised records (should have all pages now)