Replies: 2 comments 1 reply
-
That's a really cool package! Great question—my suggestion would be to create snapshot tests and just run Jigsaw on them for real and make sure the output is what you expect. I think you could probably set them up similarly to Jigsaw's own snapshot tests: https://github.com/tighten/jigsaw/blob/main/tests/SnapshotsTest.php. Since There might be a way to 'mock' Jigsaw and hook into the container directly but I think snapshot tests are going to be a lot simpler and easier to set up, and also provide a better end-to-end guarantee that everything works the way you want in a real site. Let me know how it goes and if you have other questions! |
Beta Was this translation helpful? Give feedback.
-
My package jigsaw-localization offers a façade that handles loading localization data into the
config
on thebeforeBuild
event.I need to get a Jigsaw instance, set the config on it, then use my helpers and assert some output.
I don't know how to hook to Jigsaw's lifecycle and use its container.
Beta Was this translation helpful? Give feedback.
All reactions