@@ -117,22 +117,9 @@ public function test_validation_errors_are_returned_in_the_correct_format($error
117
117
$ this ->assertSame ('The email must be a valid email address. ' , $ errors ->email );
118
118
}
119
119
120
- public function multipleErrorBagsValidationErrorsProvider ()
120
+ public function test_validation_exceptions_can_have_multiple_error_bags ()
121
121
{
122
- $ array = [
123
- 'default ' => [
124
- 'name ' => [
125
- 'The name field is required. ' ,
126
- ],
127
- 'email ' => 'The email must be a valid email address. ' ,
128
- ],
129
- 'example ' => [
130
- 'name ' => 'The name field is required. ' ,
131
- 'email ' => 'The email must be a valid email address. ' ,
132
- ],
133
- ];
134
-
135
- $ viewErrorBag = tap (new ViewErrorBag (), function ($ errorBag ) {
122
+ Session::put ('errors ' , tap (new ViewErrorBag (), function ($ errorBag ) {
136
123
$ errorBag ->put ('default ' , new MessageBag ([
137
124
'name ' => 'The name field is required. ' ,
138
125
'email ' => 'The email must be a valid email address. ' ,
@@ -143,18 +130,7 @@ public function multipleErrorBagsValidationErrorsProvider()
143
130
'The email must be a valid email address. ' ,
144
131
],
145
132
]));
146
- });
147
-
148
- return [
149
- [$ array ],
150
- [$ viewErrorBag ],
151
- ];
152
- }
153
-
154
- /** @dataProvider multipleErrorBagsValidationErrorsProvider */
155
- public function test_validation_exceptions_can_have_multiple_error_bags ($ errors )
156
- {
157
- Session::put ('errors ' , $ errors );
133
+ }));
158
134
159
135
$ errors = Inertia::getShared ('errors ' )();
160
136
0 commit comments