|
@@ 143-152 (lines=10) @@
|
| 140 |
|
$this->assertNull($this->app->make('translatable.locales')['jp']); |
| 141 |
|
} |
| 142 |
|
|
| 143 |
|
public function test_add_language_locale() |
| 144 |
|
{ |
| 145 |
|
$this->app['config']->set('translatable.locales', [ |
| 146 |
|
'de', |
| 147 |
|
]); |
| 148 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de')); |
| 149 |
|
$this->assertFalse($this->app->make('translatable.locales')->has('en')); |
| 150 |
|
$this->app->make('translatable.locales')->add('en'); |
| 151 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('en')); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
public function test_offset_set_language_locale() |
| 155 |
|
{ |
|
@@ 154-163 (lines=10) @@
|
| 151 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('en')); |
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
public function test_offset_set_language_locale() |
| 155 |
|
{ |
| 156 |
|
$this->app['config']->set('translatable.locales', [ |
| 157 |
|
'de', |
| 158 |
|
]); |
| 159 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de')); |
| 160 |
|
$this->assertFalse($this->app->make('translatable.locales')->has('en')); |
| 161 |
|
$this->app->make('translatable.locales')[] = 'en'; |
| 162 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('en')); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
public function test_offset_set_country_locale() |
| 166 |
|
{ |
|
@@ 165-174 (lines=10) @@
|
| 162 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('en')); |
| 163 |
|
} |
| 164 |
|
|
| 165 |
|
public function test_offset_set_country_locale() |
| 166 |
|
{ |
| 167 |
|
$this->app['config']->set('translatable.locales', [ |
| 168 |
|
'de', |
| 169 |
|
]); |
| 170 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de')); |
| 171 |
|
$this->assertFalse($this->app->make('translatable.locales')->has('de-AT')); |
| 172 |
|
$this->app->make('translatable.locales')['de'] = 'AT'; |
| 173 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de-AT')); |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
public function test_forget() |
| 177 |
|
{ |
|
@@ 176-186 (lines=11) @@
|
| 173 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de-AT')); |
| 174 |
|
} |
| 175 |
|
|
| 176 |
|
public function test_forget() |
| 177 |
|
{ |
| 178 |
|
$this->app['config']->set('translatable.locales', [ |
| 179 |
|
'de', |
| 180 |
|
'en', |
| 181 |
|
]); |
| 182 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de')); |
| 183 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('en')); |
| 184 |
|
$this->app->make('translatable.locales')->forget('en'); |
| 185 |
|
$this->assertFalse($this->app->make('translatable.locales')->has('en')); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
public function test_offset_unset() |
| 189 |
|
{ |
|
@@ 188-198 (lines=11) @@
|
| 185 |
|
$this->assertFalse($this->app->make('translatable.locales')->has('en')); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
public function test_offset_unset() |
| 189 |
|
{ |
| 190 |
|
$this->app['config']->set('translatable.locales', [ |
| 191 |
|
'de', |
| 192 |
|
'en', |
| 193 |
|
]); |
| 194 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('de')); |
| 195 |
|
$this->assertTrue($this->app->make('translatable.locales')->has('en')); |
| 196 |
|
unset($this->app->make('translatable.locales')['en']); |
| 197 |
|
$this->assertFalse($this->app->make('translatable.locales')->has('en')); |
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
public function test_get_locale_separator_config() |
| 201 |
|
{ |