Replies: 6 comments 5 replies
-
Hey @bobmulder first off - very sorry for a slow reply to your issue here - it's been a crazy couple of weeks so I'm just getting back into Saloon development. I hope you are well. I have to say I really love this 🔥 Do you have any plans to make a PR for this? Otherwise I can add it to my v3/v4 roadmap |
Beta Was this translation helpful? Give feedback.
-
Hi @Sammyjo20! I can't blame you, since I have a hard time myself to keep organised here, so no worries 😜. I love your enthusiasm about the idea. It wouldn't be fair to make you do the work for v3/v4 yourself. I'd love to collaborate on this. I would be able to do the biggest implementation/coding part, and would need a little help with testing, some decisions, and making it all ready to release. But first we have to make some decisions on the DX. Would you prefer to continue discussing on here or schedule a videocall? |
Beta Was this translation helpful? Give feedback.
-
Some thoughts that crossed my mind: Providing a
|
Beta Was this translation helpful? Give feedback.
-
Hi @bobmulder sorry for the delay - I like your idea! I'm happy if you want to go ahead and make a PR and then we can work together from that? Could you make a PR for the v3 branch too? All the tests pass (phpstan doesn't but that's fine) |
Beta Was this translation helpful? Give feedback.
-
Hi @Sammyjo20, I will set up a first draft next week based on v3. I'll start with a |
Beta Was this translation helpful? Give feedback.
-
The first idea (of adding the |
Beta Was this translation helpful? Give feedback.
-
Hi Sam!
Working with Saloon makes it a joy to develop my API integrations. However, when testing, my test classes become a mess. I often use
assertSent
, with a callable and a bunch of checks which looks like:Today, I started experimenting in how I'd like to design my tests, and came up with my own
RequestValidator
. Using this helper, results in:Presonally I like this kind of syntax. Maybe I'd make some changes later, but I want to check up with you what you think about it. Would this be a nice addition to Saloon to make testing API's a joy?
For anyone else interested, this is what
RequestValidator
looks like right now:Beta Was this translation helpful? Give feedback.
All reactions