File tree Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Expand file tree Collapse file tree 2 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 1010use Illuminate \Support \Collection ;
1111use Illuminate \Support \Facades \App ;
1212use Illuminate \Support \Facades \Config ;
13+ use Illuminate \Support \Facades \Lang ;
1314use Illuminate \Support \Facades \Route ;
1415use Orchestra \Testbench \TestCase as BaseTestCase ;
1516
@@ -93,6 +94,23 @@ protected function setUseLocalizer($value)
9394 Config::set ('localized-routes.use_localizer ' , $ value );
9495 }
9596
97+ /**
98+ * Fake that we created a routes.php file in 'resources/lang/'
99+ * for each language with the given translations.
100+ *
101+ * @param $translations
102+ *
103+ * @return void
104+ */
105+ protected function setTranslations ($ translations )
106+ {
107+ Lang::setLoaded ([
108+ '* ' => [
109+ 'routes ' => $ translations
110+ ]
111+ ]);
112+ }
113+
96114 /**
97115 * Get the currently registered routes.
98116 *
Original file line number Diff line number Diff line change @@ -78,21 +78,4 @@ public function it_skips_placeholders_in_a_uri()
7878
7979 $ this ->assertEquals ('artikels/{article} ' , Lang::uri ('articles/{article} ' , 'nl ' ));
8080 }
81-
82- /**
83- * Fake that we created a routes.php file in 'resources/lang/'
84- * for each language with the given translations.
85- *
86- * @param $translations
87- *
88- * @return void
89- */
90- protected function setTranslations ($ translations )
91- {
92- Lang::setLoaded ([
93- '* ' => [
94- 'routes ' => $ translations
95- ]
96- ]);
97- }
9881}
You can’t perform that action at this time.
0 commit comments