Skip to content

Commit

Permalink
Fix export test with watch
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasss93 committed Aug 10, 2020
1 parent cd0ada6 commit 8c0e844
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions tests/LarexExportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand All @@ -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
Expand Down

0 comments on commit 8c0e844

Please sign in to comment.