File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ public function testRegularViewNamesGetReturned()
130
130
$ this ->assertSame ('alert ' , $ component ->resolveView ());
131
131
}
132
132
133
- public function testHtmlablesGetReturned ()
133
+ public function testHtmlableGetReturned ()
134
134
{
135
135
$ component = new TestHtmlableReturningViewComponent ;
136
136
@@ -187,9 +187,14 @@ public function testResolveComponentsUsing()
187
187
{
188
188
$ component = new TestInlineViewComponent ;
189
189
190
- Component::resolveComponentsUsing (fn () => $ component );
190
+ Component::resolveComponentsUsing (function ($ class , $ data ) use ($ component ) {
191
+ $ this ->assertSame (Component::class, $ class , 'It takes the component class name as the first parameter. ' );
192
+ $ this ->assertSame (['foo ' => 'bar ' ], $ data , 'It takes the given data as the second parameter. ' );
191
193
192
- $ this ->assertSame ($ component , Component::resolve ('bar ' ));
194
+ return $ component ;
195
+ });
196
+
197
+ $ this ->assertSame ($ component , Component::resolve (['foo ' => 'bar ' ]));
193
198
}
194
199
195
200
public function testBladeViewCacheWithRegularViewNameViewComponent ()
You can’t perform that action at this time.
0 commit comments