@@ -18,15 +18,15 @@ public function it_can_save_the_translation_by_specifying_translatable_attribute
1818 'product_category_id ' => 3 ,
1919 'published ' => true
2020 ]);
21- $ product ->translate ('en ' );
21+ $ product ->translateTo ('en ' );
2222 $ product ->title = 'English title ' ;
2323 $ product ->description = 'English description ' ;
2424
25- $ product ->translate ('es ' );
25+ $ product ->translateTo ('es ' );
2626 $ product ->title = 'Spanish title ' ;
2727 $ product ->description = 'Spanish description ' ;
2828
29- $ product ->translate ('de ' );
29+ $ product ->translateTo ('de ' );
3030 $ product ->title = 'German title ' ;
3131 $ product ->description = 'German description ' ;
3232
@@ -35,7 +35,7 @@ public function it_can_save_the_translation_by_specifying_translatable_attribute
3535 $ product = Product::orderBy ('id ' , 'desc ' )->first ();
3636
3737 foreach (I18n::getAllLocale () as $ locale ) {
38- $ product ->translate ($ locale );
38+ $ product ->translateTo ($ locale );
3939
4040 self ::assertEquals ($ locale ->name . ' title ' , $ product ->title );
4141 self ::assertEquals ($ locale ->name . ' description ' , $ product ->description );
@@ -64,7 +64,7 @@ public function it_can_be_filled_and_saved_with_complete_translation_attributes(
6464 $ product = Product::orderBy ('id ' , 'desc ' )->first ();
6565
6666 foreach (I18n::getAllLocale () as $ locale ) {
67- $ product ->translate ($ locale );
67+ $ product ->translateTo ($ locale );
6868
6969 self ::assertEquals ($ locale ->name . ' title ' , $ product ->title );
7070 self ::assertEquals ($ locale ->name . ' description ' , $ product ->description );
@@ -91,15 +91,15 @@ public function it_can_be_filled_with_incomplete_translation_attributes()
9191
9292 $ product = Product::orderBy ('id ' , 'desc ' )->first ();
9393
94- $ product ->translate ('en ' );
94+ $ product ->translateTo ('en ' );
9595 self ::assertEquals ('English title ' , $ product ->title );
9696 self ::assertEquals ('English description ' , $ product ->description );
9797
98- $ product ->translate ('es ' );
98+ $ product ->translateTo ('es ' );
9999 self ::assertEquals ('English title ' , $ product ->title );
100100 self ::assertEquals ('Spanish description ' , $ product ->description );
101101
102- $ product ->translate ('de ' );
102+ $ product ->translateTo ('de ' );
103103 self ::assertEquals ('German title ' , $ product ->title );
104104 self ::assertEquals ('English description ' , $ product ->description );
105105 }
@@ -160,7 +160,7 @@ public function it_can_update_all_translation_records_with_mass_assignment()
160160 $ product = Product::find ($ original ->id );
161161
162162 foreach (I18n::getAllLocale () as $ locale ) {
163- $ product ->translate ($ locale );
163+ $ product ->translateTo ($ locale );
164164
165165 self ::assertEquals ($ locale ->name . ' title 2 ' , $ product ->title );
166166 self ::assertEquals ($ locale ->name . ' description 2 ' , $ product ->description );
@@ -176,7 +176,7 @@ public function it_can_update_all_translation_records_with_single_assignment()
176176 $ original ->title = 'English title ' ;
177177 $ original ->description = 'English description ' ;
178178 // Spanish value
179- $ original ->translate ('es ' );
179+ $ original ->translateTo ('es ' );
180180 $ original ->title = 'Spanish title ' ;
181181 $ original ->description = 'Spanish description ' ;
182182 $ original ->save ();
@@ -186,19 +186,19 @@ public function it_can_update_all_translation_records_with_single_assignment()
186186 $ product ->title = 'English title 2 ' ;
187187 $ product ->description = 'English description 2 ' ;
188188 // Spanish value
189- $ product ->translate ('es ' );
189+ $ product ->translateTo ('es ' );
190190 $ product ->title = 'Spanish title 2 ' ;
191191 $ product ->description = 'Spanish description 2 ' ;
192192 // German value
193- $ product ->translate ('de ' );
193+ $ product ->translateTo ('de ' );
194194 $ product ->title = 'German title 2 ' ;
195195 $ product ->description = 'German description 2 ' ;
196196 $ product ->save ();
197197
198198 $ product = Product::find ($ original ->id );
199199
200200 foreach (I18n::getAllLocale () as $ locale ) {
201- $ product ->translate ($ locale );
201+ $ product ->translateTo ($ locale );
202202
203203 self ::assertEquals ($ locale ->name . ' title 2 ' , $ product ->title );
204204 self ::assertEquals ($ locale ->name . ' description 2 ' , $ product ->description );
0 commit comments