File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,31 @@ public function testSave()
565565 $ this ->assertSame ('test ' , $ data ['custom ' ]);
566566 }
567567
568+ /**
569+ * @covers ::save
570+ */
571+ public function testSaveCustomTranslations ()
572+ {
573+ new App ([
574+ 'roots ' => [
575+ 'index ' => static ::TMP ,
576+ 'languages ' => static ::TMP . '/languages ' ,
577+ 'translations ' => static ::TMP . '/translations '
578+ ]
579+ ]);
580+
581+ $ file = static ::TMP . '/translations/en.php ' ;
582+ F::write ($ file , '' );
583+ $ language = new Language ([
584+ 'code ' => 'en '
585+ ]);
586+ $ language ->save ();
587+ $ language ->variable ('foo ' )->update ('bar ' );
588+ $ translations = $ language ->translationsObject ();
589+
590+ $ this ->assertSame (['foo ' => 'bar ' ], $ translations ->toArray ());
591+ }
592+
568593 /**
569594 * @covers ::toArray
570595 * @covers ::__debugInfo
You can’t perform that action at this time.
0 commit comments