]> BookStack Code Mirror - bookstack/blobdiff - tests/LanguageTest.php
Added method for using enity ownership in relation queries
[bookstack] / tests / LanguageTest.php
index d5c6e453238ead0b3d82f0d805d23f7983fdf676..ba522a74e380c5de371899011500e703e83189d9 100644 (file)
@@ -1,14 +1,15 @@
-<?php namespace Tests;
+<?php
+
+namespace Tests;
 
 class LanguageTest extends TestCase
 {
-
     protected $langs;
 
     /**
      * LanguageTest constructor.
      */
-    public function setUp(): void
+    protected function setUp(): void
     {
         parent::setUp();
         $this->langs = array_diff(scandir(resource_path('lang')), ['..', '.']);
@@ -61,6 +62,7 @@ class LanguageTest extends TestCase
         foreach ($this->langs as $lang) {
             foreach ($files as $file) {
                 $loadError = false;
+
                 try {
                     $translations = trans(str_replace('.php', '', $file), [], $lang);
                 } catch (\Exception $e) {
@@ -74,10 +76,9 @@ class LanguageTest extends TestCase
     public function test_rtl_config_set_if_lang_is_rtl()
     {
         $this->asEditor();
-        $this->assertFalse(config('app.rtl'), "App RTL config should be false by default");
-        setting()->putUser($this->getEditor(), 'language', 'ar');
+        $this->assertFalse(config('app.rtl'), 'App RTL config should be false by default');
+        setting()->putUser($this->users->editor(), 'language', 'ar');
         $this->get('/');
-        $this->assertTrue(config('app.rtl'), "App RTL config should have been set to true by middleware");
+        $this->assertTrue(config('app.rtl'), 'App RTL config should have been set to true by middleware');
     }
-
-}
\ No newline at end of file
+}