@@ -44,7 +44,7 @@ public function it_checks_if_the_translation_for_the_current_locale_is_unique()
44
44
{
45
45
$ rules = [
46
46
'slug ' => "{$ this ->rule }: {$ this ->table }" ,
47
- 'name ' => new UniqueTranslationRule ($ this ->table ),
47
+ 'name ' => UniqueTranslationRule:: for ($ this ->table ),
48
48
];
49
49
50
50
$ this ->createRoute ('test ' , $ rules );
@@ -65,7 +65,7 @@ public function it_checks_if_the_translation_for_a_specific_locale_is_unique()
65
65
{
66
66
$ rules = [
67
67
'slug.* ' => "{$ this ->rule }: {$ this ->table }" ,
68
- 'name.* ' => new UniqueTranslationRule ($ this ->table ),
68
+ 'name.* ' => UniqueTranslationRule:: for ($ this ->table ),
69
69
];
70
70
71
71
$ this ->createRoute ('test ' , $ rules );
@@ -96,7 +96,7 @@ public function the_models_attribute_name_can_be_specified()
96
96
{
97
97
$ rules = [
98
98
'form_slug ' => "{$ this ->rule }: {$ this ->table },slug " ,
99
- 'form_name ' => new UniqueTranslationRule ($ this ->table , 'name ' ),
99
+ 'form_name ' => UniqueTranslationRule:: for ($ this ->table , 'name ' ),
100
100
];
101
101
102
102
$ this ->createRoute ('test-single ' , $ rules );
@@ -108,7 +108,7 @@ public function the_models_attribute_name_can_be_specified()
108
108
109
109
$ rules = [
110
110
'form_slug.* ' => "{$ this ->rule }: {$ this ->table },slug " ,
111
- 'form_name.* ' => new UniqueTranslationRule ($ this ->table , 'name ' ),
111
+ 'form_name.* ' => UniqueTranslationRule:: for ($ this ->table , 'name ' ),
112
112
];
113
113
114
114
$ this ->createRoute ('test-array ' , $ rules );
@@ -124,7 +124,7 @@ public function it_ignores_the_given_id()
124
124
{
125
125
$ rules = [
126
126
'slug ' => "{$ this ->rule }: {$ this ->table },slug, {$ this ->model ->id }" ,
127
- 'name ' => ( new UniqueTranslationRule ($ this ->table ) )->ignore ($ this ->model ->id ),
127
+ 'name ' => UniqueTranslationRule:: for ($ this ->table )->ignore ($ this ->model ->id ),
128
128
];
129
129
130
130
$ this ->createRoute ('test-single ' , $ rules );
@@ -136,7 +136,7 @@ public function it_ignores_the_given_id()
136
136
137
137
$ rules = [
138
138
'slug.* ' => "{$ this ->rule }: {$ this ->table },slug, {$ this ->model ->id }" ,
139
- 'name.* ' => ( new UniqueTranslationRule ($ this ->table ) )->ignore ($ this ->model ->id ),
139
+ 'name.* ' => UniqueTranslationRule:: for ($ this ->table )->ignore ($ this ->model ->id ),
140
140
];
141
141
142
142
$ this ->createRoute ('test-array ' , $ rules );
@@ -152,7 +152,7 @@ public function it_ignores_a_specific_attribute_with_the_given_value()
152
152
{
153
153
$ rules = [
154
154
'slug ' => "{$ this ->rule }: {$ this ->table },slug, {$ this ->model ->other_field },other_field " ,
155
- 'name ' => ( new UniqueTranslationRule ($ this ->table ) )->ignore ($ this ->model ->other_field , 'other_field ' ),
155
+ 'name ' => UniqueTranslationRule:: for ($ this ->table )->ignore ($ this ->model ->other_field , 'other_field ' ),
156
156
];
157
157
158
158
$ this ->createRoute ('test-single ' , $ rules );
@@ -164,7 +164,7 @@ public function it_ignores_a_specific_attribute_with_the_given_value()
164
164
165
165
$ rules = [
166
166
'slug.* ' => "{$ this ->rule }: {$ this ->table },slug, {$ this ->model ->other_field },other_field " ,
167
- 'name.* ' => ( new UniqueTranslationRule ($ this ->table ) )->ignore ($ this ->model ->other_field , 'other_field ' ),
167
+ 'name.* ' => UniqueTranslationRule:: for ($ this ->table )->ignore ($ this ->model ->other_field , 'other_field ' ),
168
168
];
169
169
170
170
$ this ->createRoute ('test-array ' , $ rules );
@@ -180,7 +180,7 @@ public function it_returns_a_default_error_message_when_validating_a_single_tran
180
180
{
181
181
$ rules = [
182
182
'form_slug ' => "{$ this ->rule }: {$ this ->table },slug " ,
183
- 'form_name ' => new UniqueTranslationRule ($ this ->table , 'name ' ),
183
+ 'form_name ' => UniqueTranslationRule:: for ($ this ->table , 'name ' ),
184
184
];
185
185
186
186
$ this ->createRoute ('test ' , $ rules );
@@ -219,7 +219,7 @@ public function it_returns_a_default_error_message_when_validating_an_array()
219
219
{
220
220
$ rules = [
221
221
'form_slug.* ' => "{$ this ->rule }: {$ this ->table },slug " ,
222
- 'form_name.* ' => new UniqueTranslationRule ($ this ->table , 'name ' ),
222
+ 'form_name.* ' => UniqueTranslationRule:: for ($ this ->table , 'name ' ),
223
223
];
224
224
225
225
$ this ->createRoute ('test ' , $ rules );
@@ -258,7 +258,7 @@ public function it_returns_a_custom_error_message_when_validating_a_single_trans
258
258
{
259
259
$ rules = [
260
260
'form_slug ' => "{$ this ->rule }: {$ this ->table },slug " ,
261
- 'form_name ' => new UniqueTranslationRule ($ this ->table , 'name ' ),
261
+ 'form_name ' => UniqueTranslationRule:: for ($ this ->table , 'name ' ),
262
262
];
263
263
264
264
$ messages = [
@@ -302,7 +302,7 @@ public function it_returns_a_custom_error_message_when_validating_an_array()
302
302
{
303
303
$ rules = [
304
304
'form_slug.* ' => "{$ this ->rule }: {$ this ->table },slug " ,
305
- 'form_name.* ' => new UniqueTranslationRule ($ this ->table , 'name ' ),
305
+ 'form_name.* ' => UniqueTranslationRule:: for ($ this ->table , 'name ' ),
306
306
];
307
307
308
308
$ messages = [
0 commit comments