File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,15 @@ public function toArray(): array
2626 $ result = [];
2727
2828 foreach ($ this ->getMetadata ()->properties as $ property ) {
29- $ result [$ property ] = $ this ->{$ property };
29+ $ result [Str:: snake ( $ property) ] = $ this ->{$ property };
3030 }
3131
3232 foreach ($ this ->getMetadata ()->dynamicProperties as $ property ) {
33- $ result [$ property ] = $ this ->{$ property };
33+ $ result [Str:: snake ( $ property) ] = $ this ->{$ property };
3434 }
3535
3636 foreach ($ this ->getMetadata ()->invokableMethods as $ method ) {
37- $ result [$ method ] = $ this ->{$ method };
37+ $ result [Str:: snake ( $ method) ] = $ this ->{$ method };
3838 }
3939
4040 return $ result ;
Original file line number Diff line number Diff line change 114114 $ drop = new ProductDrop ;
115115 $ drop ->setContext ($ context );
116116 expect ($ drop ->toArray ())
117- ->toHaveKeys (['productName ' , 'text ' , 'catchAll ' , 'context ' ])
118- ->productName ->toBe ('Product ' )
117+ ->toHaveKeys (['product_name ' , 'text ' , 'catch_all ' , 'context ' ])
118+ ->product_name ->toBe ('Product ' )
119119 ->text ->toBeInstanceOf (\Keepsuit \Liquid \Tests \Stubs \TextDrop::class)
120- ->catchAll ->toBeInstanceOf (\Keepsuit \Liquid \Tests \Stubs \CatchAllDrop::class)
120+ ->catch_all ->toBeInstanceOf (\Keepsuit \Liquid \Tests \Stubs \CatchAllDrop::class)
121121 ->context ->toBe ($ context );
122122});
123123
You can’t perform that action at this time.
0 commit comments