From 8c0e84443b7e15824fd737c19a54c5aedc626d9c Mon Sep 17 00:00:00 2001 From: Luca Patera Date: Tue, 11 Aug 2020 01:10:56 +0200 Subject: [PATCH] Fix export test with watch --- tests/LarexExportTest.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/LarexExportTest.php b/tests/LarexExportTest.php index 135d008..7c2fd10 100644 --- a/tests/LarexExportTest.php +++ b/tests/LarexExportTest.php @@ -73,12 +73,12 @@ public function test_larex_command(): void $this->getTestStub('export/larex-output-en-another'), File::get(resource_path('lang/en/another.php')) ); - + self::assertEquals( $this->getTestStub('export/larex-output-it-app'), File::get(resource_path('lang/it/app.php')) ); - + self::assertEquals( $this->getTestStub('export/larex-output-it-another'), File::get(resource_path('lang/it/another.php')) @@ -93,21 +93,35 @@ public function test_larex_watch(): void ->expectsOutput("Processing the '$this->file' file...") ->expectsOutput("resources/lang/en/app.php created successfully.") ->expectsOutput("resources/lang/en/another.php created successfully.") + ->expectsOutput("resources/lang/it/app.php created successfully.") + ->expectsOutput("resources/lang/it/another.php created successfully.") ->expectsOutput('Waiting for changes...') ->run(); self::assertFileExists(resource_path('lang/en/app.php')); self::assertFileExists(resource_path('lang/en/another.php')); + self::assertFileExists(resource_path('lang/it/app.php')); + self::assertFileExists(resource_path('lang/it/another.php')); self::assertEquals( - $this->getTestStub('export/larex-output-app'), + $this->getTestStub('export/larex-output-en-app'), File::get(resource_path('lang/en/app.php')) ); self::assertEquals( - $this->getTestStub('export/larex-output-another'), + $this->getTestStub('export/larex-output-en-another'), File::get(resource_path('lang/en/another.php')) ); + + self::assertEquals( + $this->getTestStub('export/larex-output-it-app'), + File::get(resource_path('lang/it/app.php')) + ); + + self::assertEquals( + $this->getTestStub('export/larex-output-it-another'), + File::get(resource_path('lang/it/another.php')) + ); } public function test_larex_command_with_numeric_keys(): void