Disabling HTML5 Form Validation For Laravel Dusk Tests
– cwhite.me - submitted by Chris White
Disabling client-side browser validation will allow you to test your real validation rules, instead of Chrome's.
Read more [cwhite.me]
– cwhite.me - submitted by Chris White
Disabling client-side browser validation will allow you to test your real validation rules, instead of Chrome's.
Read more [cwhite.me]
For many years we've relied on Travis to run the tests of our packages. For projects we used Circle CI. Recently we moved this responsibility from Travis and Circle CI to GitHub actions. In this blogpost I'd like to explain why and how we did this.
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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
⚗️ One of the most common integrations developers struggle to test is Guzzle. Fortunately, it has a `MockHandler` you can set up to return predefined responses.
— Jason McCreary (@gonedark) 23 december 2019
Since it uses the existing `Client` and `Response` objects, there's no need to change your implementation. pic.twitter.com/Ui2Zyqj2Lt
Read more [twitter.com]
Here's a little tip: you can use `yield` in phpunit data providers to make them a little more readable pic.twitter.com/rQeKw7jBed
— Brent (@brendt_gd) 12 december 2019
Read more [twitter.com]
Mattias Geniar explains how you can use GitHub actions to run the testsuite of your Laravel app.
Last year we wrote a blogpost about our setup we use for Oh Dear! with Gitlab, and how we use their pipelines for running our CI tests. Since then, we've moved back to Github since they introduced their free private repositories. In this post I'll describe how we re-configured our CI environment using Github Actions.
Read more [ma.ttias.be]
Regarding https://t.co/Ky9pICMocc, here's an example (not saying it makes sense to write this test, just showing how it works). pic.twitter.com/1MOFXk1H79
— Matthias Noback (@matthiasnoback) 2 oktober 2019
Read more [twitter.com]
Roberto B wrote a good tutorial on how to test your Laravel 6 application using GitHub actions.
The scenario that I would like to explain you is: I have a Web App based on Laravel 6, every time I push some new code on master branch on the GitHub repository, I would like to execute automatically Unit tests and Feature tests.
Read more [medium.com]
☝️If you are relatively new to Testing in Laravel. Here are 3 methods you NEED to be familiar with.
— Caleb Porzio (@calebporzio) August 21, 2019
Understanding these will make your life much easier. pic.twitter.com/x3mxjCsV9z
Read more [twitter.com]
Earlier this year we released v2 of laravel-event-sourcing. This package is probably the easiest way to getting started with event sourcing in Laravel. A significant feature of v2 was the addition of aggregates.
Today we released another new version of the package that adds test methods. These methods allow you to verify if the aggregate behaves correctly. In this post, I'll show you an example and explain how the test methods are implemented.
These test methods were inspired by the awesome testing methods Frank De Jonge made in his Eventsauce package.
Jason McCreary wrote an epic blogpost on how to get started with tests in a Laravel app. I wish I could have read this when I started out with testing.
This brings me to the next common response, we don’t know where to start testing. This comes in two forms. The first form is quite literally we don’t know which test to write first. The second form is more not knowing how to write the first test. ... Today, I want to focus on getting started with testing your Laravel applications.
Read more [jasonmccreary.me]
Tim MacDonald, a freelance software developer based in Sydney, investigates how to make Laravel tests run faster. Turns out you a lot can be gained by caching the config.
I saw a conversation on Twitter the other day discussing how Laravel was slowing down a test suite. I decided I wanted to dig into this and see if there was anything to it.
Read more [timacdonald.me]
Imagine you're building that your app can notify your user, but you don't want to send more than one notification in a timeframe of five seconds. How are you going to test the time aspect? Do you have to create a test that takes five minutes?
Ire Aderinokun, Front-End Developer and User Interface Designer, explains how you can Lighthouse in CI.
Until recently, I also hadn't setup an official performance budget and enforced it. This isn’t to say that I never did performance audits. I frequently use tools like PageSpeed Insights and take the feedback to make improvements. But what I had never done was set a list of metrics that I needed the site to meet, and enforce them using some automated tool.
Read more [bitsofco.de]
My colleague Brent wrote another excellent blog post, this time on tests and types.
So while strong types can help us to ensure program correctness, some tests will always be a necessity to ensure business correctness. It's a matter of "both and", not "either or".
Read more [stitcher.io]
Over at Laravel News, Paul Redmond published a good way to test streamed responses.
Read more [laravel-news.com]
It's a bit of a click baity title, but reading it I learning that all PHPUnit's asserts have a function equivalent.
During the preparation of TDD workshops, I began to think about how to write assertions. It turns out that there are several possibilities, but is there the only correct one?
Read more [arkadiuszkondas.com]
How to test something you are pulling OUT of Storage.
— Jake Bennett (@JacobBennett) March 19, 2019
Typically Laravel Storage testing is comprised of asserting that you put something IN Storage. If you happen to be pulling something down from a Storage disk and doing some processing on it, this has been helpful. pic.twitter.com/VjSqo914US
Read more [twitter.com]
Over at the Tighten blog, Chris Trombley published a new post on how to use data providers in PHPUnit.
PHPUnit gives us a way to consolidate this common logic while varying our setup data, without losing the benefit of dedicated, smaller test methods. In this post, we'll explore PHPUnit's data providers. While data providers are available in any PHPUnit test suite, let's look at how they can help us tidy up our tests in a Laravel application.
Read more [tighten.co]