File tree 2 files changed +1
-12
lines changed
2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ public function withAttributes(array $attributes)
218
218
{
219
219
$ this ->attributes = $ this ->attributes ?: new ComponentAttributeBag ;
220
220
221
- $ this ->attributes = $ this -> attributes -> merge ($ attributes );
221
+ $ this ->attributes -> setAttributes ($ attributes );
222
222
223
223
return $ this ;
224
224
}
Original file line number Diff line number Diff line change @@ -70,17 +70,6 @@ public function testMethodsOverridePropertyValues()
70
70
$ this ->assertArrayHasKey ('world ' , $ variables );
71
71
$ this ->assertEquals ('world property ' , $ variables ['world ' ]);
72
72
}
73
-
74
- public function testAttributesAreMergedNotOverwritten ()
75
- {
76
- $ component = new TestDefaultAttributesComponent ;
77
-
78
- $ this ->assertEquals ('text-red-500 ' , $ component ->attributes ->get ('class ' ));
79
-
80
- $ component ->withAttributes (['class ' => 'bg-blue-100 ' ]);
81
-
82
- $ this ->assertEquals ('bg-blue-100 text-red-500 ' , $ component ->attributes ->get ('class ' ));
83
- }
84
73
}
85
74
86
75
class TestViewComponent extends Component
You can’t perform that action at this time.
0 commit comments