Craig Humphreys
banner
mrcraigh.bsky.social
Craig Humphreys
@mrcraigh.bsky.social
🧑‍💻Laravel/Vue developer (VILT stack)
🔥Creator of Alexa’s quick-fire quiz
📖 History
👨‍🍳 Cooking
🔨 Building things
Looks amazing! I’ve just pre-ordered a copy. Can’t wait to read it.
April 22, 2025 at 10:29 PM
Developers use webp because it’s smaller, so loads faster on mobile. Mainly though, Google recommend we use it to improve page speed; is annoying if you’re trying to download an image though.
April 14, 2025 at 1:51 PM
My favourite streaming service too. I’ve bookmarked this as I havent seen all these yet. Something to look forward to for the new year.
January 3, 2025 at 9:04 PM
📌
January 3, 2025 at 9:02 PM
You can use the 📌 feed. It shows any posts you replied to with a “📌”.
December 7, 2024 at 9:06 AM
I did add a second post about this, but for testing I’d only include the bits I need for the test to work. You don’t actually need to mock the response, you can just create the real object if you want but for complex responses I sometimes create convenience methods and mock them if it’s easier.
December 6, 2024 at 3:35 PM
You can then add a method to the PaymentResponse class such as getPayload() or getAttribute($name) and you can mock these to return just the data you need for your test rather than trying to recreate the entire api response.
December 6, 2024 at 3:15 PM
There are a few scenarios, but if you have a PaymentGateway class with a pay() method that returns a json response I would create a PaymentResponse class that accepts the json decoded response (associative array) and return that class.
December 6, 2024 at 3:13 PM
The rule of thumb is “don’t mock what you don’t own”. I usually just create a client class that returns a wrapper for the api response which you can then mock.
December 6, 2024 at 2:11 PM
I never even thought of looking at feeds for this. I was just scrambling around looking for recommended experts. Definitely going to be looking for feeds in future!
December 3, 2024 at 8:50 PM
📌
November 17, 2024 at 10:34 PM