christophrumpel / missing-livewire-assertions

Adding the missing Livewire assertions to your Laravel project
MIT License
135 stars 24 forks source link

Adding assertPropertyEntangled method and tests #13

Closed cheesegrits closed 2 years ago

cheesegrits commented 2 years ago

Adding support for assertPropertyEntangled(). The weirdness with the htmlspecialchars() is for the corner case where the property is entangled inside of a JS function call inside x-data, in my case supporting an input masking plugin, at which point the quotes get encoded.

BTW, you might want to preg_quote $property everywhere it is used in RE's, otherwise dotted properties like user.name could match userXname.

And ... any chance you can merge #11 supporting single or double quotes?

cheesegrits commented 2 years ago

Crap, just noticed PHP Storm stripped the trailing spaces in the test component. Let me know if you want me to undo that.

christophrumpel commented 2 years ago

Hey, thanks a lot for the PR. Looks good to me, can you just take care of the conflict? There was an older PR that I just merged before yours. The GH action should take care of the styles, so all good 👍

cheesegrits commented 2 years ago

Should be good to go.

christophrumpel commented 2 years ago

Thanks a lot @cheesegrits, nice addition!