mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-05 01:24:38 +08:00
Added lang tests and update export text keys
This commit is contained in:
21
tests/LanguageTest.php
Normal file
21
tests/LanguageTest.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php namespace Tests;
|
||||
|
||||
class LanguageTest extends TestCase
|
||||
{
|
||||
|
||||
public function test_js_endpoint_for_each_language() {
|
||||
|
||||
$langs = array_diff(scandir(resource_path('lang')), ['..', '.']);
|
||||
$visibleKeys = ['common', 'components', 'entities', 'errors'];
|
||||
|
||||
$this->asEditor();
|
||||
foreach ($langs as $lang) {
|
||||
setting()->putUser($this->getEditor(), 'language', $lang);
|
||||
$transResp = $this->get('/translations');
|
||||
foreach ($visibleKeys as $key) {
|
||||
$transResp->assertSee($key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user