@@ -105,43 +105,4 @@ public function settingInvalidPropertyThrowsAnException()
105105 $ response = new FilterResponse ([]);
106106 $ response ->foo = false ;
107107 }
108-
109- /**
110- * @test
111- * @covers ::toArray
112- * @dataProvider provideToArray
113- *
114- * @param array $value The filtered value to pass to the response.
115- * @param array $errors The errors to pass to the response.
116- * @param array $unknowns The unknowns to pass to the response.
117- * @param array $expected The expected array value.
118- */
119- public function toArray (array $ value , array $ errors , array $ unknowns , array $ expected )
120- {
121- $ response = new FilterResponse ($ value , $ errors , $ unknowns );
122- $ arrayResponse = $ response ->toArray ();
123-
124- $ this ->assertSame ($ expected , $ arrayResponse );
125- }
126-
127- /**
128- * @return array
129- */
130- public function provideToArray () : array
131- {
132- return [
133- 'success ' => [
134- 'input ' => ['foo ' => 'bar ' ],
135- 'errors ' => [],
136- 'unknowns ' => ['other ' => 'unknown ' ],
137- 'expected ' => [true , ['foo ' => 'bar ' ], null , ['other ' => 'unknown ' ]],
138- ],
139- 'failure ' => [
140- 'input ' => ['foo ' => 'bar ' ],
141- 'errors ' => ['something bad happened ' , 'and something else too ' ],
142- 'unknowns ' => ['other ' => 'unknown ' ],
143- 'expected ' => [false , null , "something bad happened \nand something else too " , ['other ' => 'unknown ' ]],
144- ],
145- ];
146- }
147108}
0 commit comments