PHP Class CommandMissingTests, laravel-localization-helpers

Inheritance: extends TestCase
Show file Open project: potsky/laravel-localization-helpers Class Usage Examples

Public Methods

Method Description
setUp ( ) Setup the test environment.
testDefaultLangFolderDoesNotExist ( ) - Default lang folders are used when custom land folder path as not been set by user
testDefaultLangFolderExists ( ) - Default lang folders are used when custom land folder path as not been set by user
testFlatOutput ( ) - the default lang file array is structured - the new-value option works
testLangFileDoesNotExist ( ) - lang files have been created - lemma without a family is rejected - the default lang file array is structured - the default translation is prefixed by TO DO
testLangFileExistsWithBackup ( ) - create dumb lang files to verify backups are done
testLangFolderDoesNotExist ( ) - Set a non existing lang folder
testNothingToDo ( )
testObsoleteLemma ( )
testSilent ( )
testTranslationFallback ( ) - new-value set to null converts translation to null value to provide translation fallback
testTranslations ( ) - check a word is correctly translated
testTranslationsNotConfigured ( )
testVerbose ( ) - the default lang file array is structured - the new-value option works

Method Details

setUp() public method

- Remove all previous lang files before each test - Set custom configuration paths
public setUp ( )

testDefaultLangFolderDoesNotExist() public method

In Laravel 5.x, orchestra/testbench has not empty lang en directory, so return code is 0 and not 1

testDefaultLangFolderExists() public method

- Default lang folders are used when custom land folder path as not been set by user

testFlatOutput() public method

- the default lang file array is structured - the new-value option works
public testFlatOutput ( )

testLangFileDoesNotExist() public method

- lang files have been created - lemma without a family is rejected - the default lang file array is structured - the default translation is prefixed by TO DO

testLangFileExistsWithBackup() public method

- create dumb lang files to verify backups are done

testLangFolderDoesNotExist() public method

- Set a non existing lang folder

testNothingToDo() public method

public testNothingToDo ( )

testObsoleteLemma() public method

public testObsoleteLemma ( )

testSilent() public method

public testSilent ( )

testTranslationFallback() public method

https://github.com/potsky/laravel-localization-helpers/issues/38

testTranslations() public method

- check a word is correctly translated
public testTranslations ( )

testTranslationsNotConfigured() public method

testVerbose() public method

- the default lang file array is structured - the new-value option works
public testVerbose ( )