Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrations now have to be manually published * Documented registerLoader * Register before boot * Snake case config keys * TranslationLoaderManager refactors * Removed unnecessary table property on LanguageLine * Renamed createTranslation to createLanguageLine in tetst * Removed spatie/laravel-translatable dependency * Composer CS * CS * Documented TranslationLoader * InvalidConfiguration CS * Applied fixes from StyleCI
- Loading branch information
1 parent
1bd65cf
commit b83d3ed
Showing
13 changed files
with
113 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Spatie\TranslationLoader\Test; | ||
|
||
class LanguageLineTest extends TestCase | ||
{ | ||
/** @test */ | ||
public function it_can_get_a_translation() | ||
{ | ||
$languageLine = $this->createLanguageLine('group', 'new', ['en' => 'english', 'nl' => 'nederlands']); | ||
|
||
$this->assertEquals('english', $languageLine->getTranslation('en')); | ||
$this->assertEquals('nederlands', $languageLine->getTranslation('nl')); | ||
} | ||
|
||
/** @test */ | ||
public function it_can_set_a_translation() | ||
{ | ||
$languageLine = $this->createLanguageLine('group', 'new', ['en' => 'english']); | ||
|
||
$languageLine->setTranslation('nl', 'nederlands'); | ||
|
||
$this->assertEquals('english', $languageLine->getTranslation('en')); | ||
$this->assertEquals('nederlands', $languageLine->getTranslation('nl')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters