mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Fixed issues found from tests
This commit is contained in:
@@ -247,7 +247,7 @@ class BookTest extends TestCase
|
||||
'name' => 'информация',
|
||||
]);
|
||||
|
||||
$this->assertEquals('informaciya', $book->slug);
|
||||
$this->assertEquals('informaciia', $book->slug);
|
||||
|
||||
$book = $this->entities->newBook([
|
||||
'name' => '¿Qué?',
|
||||
|
@@ -12,7 +12,7 @@ class LanguageTest extends TestCase
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
$this->langs = array_diff(scandir(resource_path('lang')), ['..', '.']);
|
||||
$this->langs = array_diff(scandir(lang_path('')), ['..', '.']);
|
||||
}
|
||||
|
||||
public function test_locales_config_key_set_properly()
|
||||
@@ -58,7 +58,7 @@ class LanguageTest extends TestCase
|
||||
|
||||
public function test_all_lang_files_loadable()
|
||||
{
|
||||
$files = array_diff(scandir(resource_path('lang/en')), ['..', '.']);
|
||||
$files = array_diff(scandir(lang_path('en')), ['..', '.']);
|
||||
foreach ($this->langs as $lang) {
|
||||
foreach ($files as $file) {
|
||||
$loadError = false;
|
||||
|
@@ -19,6 +19,7 @@ use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use League\CommonMark\ConfigurableEnvironmentInterface;
|
||||
use League\CommonMark\Environment\Environment;
|
||||
|
||||
class ThemeTest extends TestCase
|
||||
{
|
||||
@@ -57,7 +58,7 @@ class ThemeTest extends TestCase
|
||||
{
|
||||
$callbackCalled = false;
|
||||
$callback = function ($environment) use (&$callbackCalled) {
|
||||
$this->assertInstanceOf(ConfigurableEnvironmentInterface::class, $environment);
|
||||
$this->assertInstanceOf(Environment::class, $environment);
|
||||
$callbackCalled = true;
|
||||
|
||||
return $environment;
|
||||
|
Reference in New Issue
Block a user