@@ -51,10 +51,15 @@ public function testAttributeRetrieval()
5151 'test-0 ' => 0 ,
5252 'test-0-string ' => '0 ' ,
5353 'test-empty-string ' => '' ,
54+ 'test-whitespace-string ' => ' ' ,
55+ 'data-test-empty-string ' => '' ,
56+ 'data-test-whitespace-string ' => ' ' ,
57+ 'value ' => ' ' ,
58+ 'alt ' => '' ,
5459 ]);
5560
56- $ this ->assertSame ('test-string="ok" test-true="test-true" test-0="0" test-0-string="0" test-empty-string="" ' , (string ) $ bag );
57- $ this ->assertSame ('test-string="ok" test-true="test-true" test-0="0" test-0-string="0" test-empty-string="" ' , (string ) $ bag ->merge ());
61+ $ this ->assertSame ('test-string="ok" test-true test-0="0" test-0-string="0" data- test-empty-string="" data-test-whitespace-string=" " value=" " alt ="" ' , (string ) $ bag );
62+ $ this ->assertSame ('test-string="ok" test-true test-0="0" test-0-string="0" data- test-empty-string="" data-test-whitespace-string=" " value=" " alt ="" ' , (string ) $ bag ->merge ());
5863
5964 $ bag = (new ComponentAttributeBag )
6065 ->merge ([
@@ -72,10 +77,14 @@ public function testAttributeRetrieval()
7277 'test-0 ' => 0 ,
7378 'test-0-string ' => '0 ' ,
7479 'test-empty-string ' => '' ,
80+ 'test-whitespace-string ' => ' ' ,
81+ 'data-test-empty-string ' => '' ,
82+ 'data-test-whitespace-string ' => ' ' ,
83+ 'value ' => ' ' ,
84+ 'alt ' => '' ,
7585 ]);
7686
77- $ this ->assertSame ('test-string="ok" test-true="test-true" test-0="0" test-0-string="0" test-empty-string="" ' , (string ) $ bag );
78-
87+ $ this ->assertSame ('test-string="ok" test-true test-0="0" test-0-string="0" data-test-empty-string="" data-test-whitespace-string=" " value=" " alt="" ' , (string ) $ bag );
7988 $ bag = (new ComponentAttributeBag )
8089 ->merge ([
8190 'test-extract-1 ' => 'extracted-1 ' ,
@@ -151,7 +160,7 @@ public function testItMakesAnExceptionForAlpineXdata()
151160 'x-data ' => true ,
152161 ]);
153162
154- $ this ->assertSame ('required="required" x-data="" ' , (string ) $ bag );
163+ $ this ->assertSame ('required x-data="" ' , (string ) $ bag );
155164 }
156165
157166 public function testItMakesAnExceptionForLivewireWireAttributes ()
0 commit comments