Don't test constructors
Matthias Noback wrote down some good testing advice.
Read more [matthiasnoback.nl]
Posts tagged with testing
Matthias Noback wrote down some good testing advice.
Read more [matthiasnoback.nl]
Laravel recently added parallel testing to the framework using the Paratest package which runs PHPUnit in separate parallel processes. Adding support for this in your own package tests is pretty straightforward using orchestral/testbench.
Read more [www.rias.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.
"Always fresh, useful tips and articles. Carefully selected community content. My favorite newsletter, which I look forward to every time."
Our test-time package makes writing tests, for code that makes its decisions based on the current time, very easy.
Here's how we use the package for some tests in Mailcoach.
– www.twilio.com - submitted by Nuno Maduro
In this tutorial, we’ll be looking at how to get started using Pest in a Laravel project. Using the test-driven approach, we’ll be building a simple to-do application that allows you to create, edit, update and delete tasks.
Read more [www.twilio.com]
– ryangjchandler.co.uk - submitted by Ryan Chandler
Testing emails can be a pain. Luckily, there are plenty of tools out there that can make the process a lot easier. Let me show you how to setup MailHog, a local development tool for testing emails.
Read more [ryangjchandler.co.uk]
Using the new parallel testing feature that recently landed in Laravel, we managed to run the Oh Dear testsuite about four times faster.
Read more [ohdear.app]
Using our laravel-mail-preview package, you can quickly display mails that are sent by your Laravel application in your browser.
Today, we've released v5 of the package. In this blog post, I'd like to tell you all about it.
In this post, Kai takes a look at how you can write tests to ensure consistent behavior across all implementations of an interface.
Read more [www.kai-sassnowski.com]
Here's how Laravel loads config values.
Read more [jasonmccreary.me]
When your unit test suite gets larger, it can take quite a long time. One of the many ways to speed this up is to hunt down and fix slow tests. Let’s use PHPUnit’s test listeners to do just that.
Read more [www.aaronsaray.com]
Earlier this year, Travis CI announced a new pricing model that effectively ends the generous open-source offering they had for many years. It seems that, even though there were some plans to provide free resources for OSS projects in the future, all activity for OSS projects has stopped.
At our company, we create a lot of open-source projects and packages. Beginning 2020, we already moved most of our stuff to GitHub actions.
Sure, you can read the GitHub actions docs to start learning the possibilities, but in my experience, it might be better to see some examples of practical uses cases. Here are some interesting links that might help you get started with GitHub actions.
– blog.jetbrains.com - submitted by Nuno Maduro
Users of Pest will be happy to know there's now a nice plugin to improves integration in PhpStorm.
Read more [blog.jetbrains.com]
Paratest is an extension on top of PhpUnit that adds support for parallel testing. For our unit tests, we could just add Paratest and it works without any configuration!
Read more [blog.mollie.com]
In this stream, my colleague Brent and I download the source of PHP 8 RC1, and test some of PHP 8's cool new features.
Brent and I are working on Front Line PHP, an ebook on cutting edge tactics in PHP 8, accompanied by videos and practical examples. Subscribe to our mailing list to get updates around this project.
– stefanzweifel.io - submitted by Stefan Zweifel
A quick intro on how to use states for "nested" Database Factories. The examples covers the Models created by laravel/cashier-paddle package.
Read more [stefanzweifel.io]
– johnbraun.blog - submitted by John Braun
When writing an end-to-end test, it is tricky to force the application to use a certain (fake) date. In this post, John Braun shares his approach using a custom middleware to be able to write Cypress tests while your application state uses a specific (fake) date.
Read more [johnbraun.blog]
In this video you'll learn how add support for multiple PHP and Laravel versions, and how to run the tests against all combinations of Laravel and PHP.
Read more [spatie.be]
– nunomaduro.com - submitted by Nuno Maduro
PEST v0.3 features a new expectation API, a brand new PHPStorm plugin, and more.
Read more [nunomaduro.com]
Michael Dyrynda explains why and how you should install pcov
Read more [dyrynda.com.au]