| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function testGetDefaultLocale() |
||
| 13 | { |
||
| 14 | $middleware = new SpellCheckMiddleware(); |
||
| 15 | |||
| 16 | Config::modify()->set(SpellController::class, 'default_locale', 'foo'); |
||
| 17 | $this->assertSame('foo', $middleware->getDefaultLocale(), 'Returns configured default'); |
||
| 18 | |||
| 19 | Config::modify() |
||
| 20 | ->set(SpellController::class, 'default_locale', false) |
||
| 21 | ->set(SpellController::class, 'locales', ['foo_BAR', 'bar_BAZ']); |
||
| 22 | $this->assertSame('foo_BAR', $middleware->getDefaultLocale(), 'Returns first in `locales`'); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |