Faking HTTP requests in Laravel original
Have you ever had to write an API integration from scratch? Where you're managing the HTTP calls yourself instead of being able to rely on third-party packages?
Have you ever had to write an API integration from scratch? Where you're managing the HTTP calls yourself instead of being able to rely on third-party packages?
In this video, which is part of the Testing Laravel video course, I explain the benefits of testing.
Read more [spatie.be]
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"I’ve been reading freeks newsletter for a while now, and it’s easily one of my favorite developer newsletters. Freek shares practical, no-nonsense insights from running Spatie, maintaining hundreds of open-source packages, and shipping real products. Every time I get useful Laravel tips, smart tooling advice, always high quality and immediately applicable."
- submitted by Mateus Guimarães
Mateus Guimaraes show a couple of neat tests powered by Pest.
Mocking, faking; these might sound like intimidating words if you don't know what they are about, but once you do, you'll be able to improve your testing skills significantly.
Part of "the art of testing" is being able to test code in some level of isolation to make sure a test suite is trustworthy and versatile. These topics are so important that we actually made five or six videos on them in our Testing Laravel course.
In this post, I want to share three ways how you can deal with mocking and faking. Let's dive in!
The newly released spatie/laravel-site-search package can crawl and index the content of one or more sites. You can think of it as a private Google search for your sites. Like most Spatie packages, it is highly customizable: you have total control over what content gets crawled and indexed.
To see the package in action, head over to the search page of this very blog.
In this post, I'd like to introduce the package to you and highlight some implementation and testing details. Let's dig in!
One of the things I really like about modern Laravel projects, are the new model factories introduced in Laravel 8.
Ray is an app we built at Spatie to make debugging your applications easier and faster. Being web developers, we naturally decided to write this app in Electron, which enabled us to move from nothing to a working prototype to a released product on 3 separate platforms within a matter of weeks.
A few days ago, a new version of 1Password was released that is able to detect where a user can reset his or her password.
A pretty interesting read by Kent on how he rebuilt his own site from scratch. Kent is mostly JavaScript focused, so it's good to get a perspective on which technolgies and solutions you choose with such a background.
The website certainly looks very good!
Read more [kentcdodds.com]
– doeken.org - submitted by Doeke Norg
In this post I want to introduce you to Tree structures. What they are, how you can use them, and in which situation they can be helpful.
Read more [doeken.org]
Testing a Laravel project is one of the most pleasant experiences I've ever had: there's a clean testing API, a very powerful layer added on top of testing frameworks; all while keeping the simplicity and eloquence you'd expect from a Laravel project.
The experience of using Livewire seems magical. It's as if your front-end HTML can call your PHP code and everything just works. A lot goes into making this magic happen.
Read more [calebporzio.com]
It was as if someone had "pulled the cables" from their data centers all at once and disconnected them from the Internet.
Read more [blog.cloudflare.com]
– doeken.org - submitted by Doeke Norg
The Adapter pattern and the Bridge Pattern have brought along a lot of confusion. Time to connect the dots.
Read more [doeken.org]
At Flare, we launched a new search experience. We have a very cool search field with autocompletions (powered by the rendering engine behind VS Code), and a very smooth graph powered by AmCharts. Let's take a look at the technical details!
Read more [flareapp.io]
– tighten.co - submitted by Jamison Valenta
Just as each workday is a little different, the same can be said about digital projects. Some digital projects are big and require large teams, months of collaboration, and brand new everything to bring them from beginning to end. So what’s a project manager to do?
Read more [tighten.co]
This edition of the meetup features those two excellent talks:
– doeken.org - submitted by Doeke Norg
Enhance (final) classes and functions by implementing these similar, but not quite the same, patterns.
Read more [doeken.org]
– ryangjchandler.co.uk - submitted by Ryan Chandler
Let's look at how we can use Pest's Expectation API with array items.
Want to learn more about testing and/or Pest? Check out Testing Laravel
Read more [ryangjchandler.co.uk]