Shalini Baskaranshalinibaskaran.hashnode.dev·Apr 24, 2024Top 10 PHP Testing Frameworks for 2024A framework is a collection or set of tools and processes that work together to support testing and developmental activities. It contains various utility libraries, reusable modules, test data setup, and other dependencies. Be it web development or t...DiscussPHP
Lukaslukasnotes.dk·Mar 3, 2024Accidentally deleting Laravel database when running tests? Here is what to do insteadLaravel 11 Since Laravel 11 removed `tests/CreatesApplication.php` file I had to dig up a new solution. Sadly, there isn't the perfect pretty one. I had to overwrite the refreshApplication method which comes from the BaseTestCase class. protected fu...DiscussWhat have I learned today...Laravel
Sanjay Singhaniacapitalnumbers.hashnode.dev·Jan 22, 2024A Guide on PHP Debugging Tools & Techniques for 2024In the dynamic landscape of web development, PHP remains a robust and widely used scripting language. While PHP offers flexibility and power, it is susceptible to bugs, glitches, and challenges that can impact the smooth execution of your projects. A...Discuss·37 readsPHP
Saiful Alamblog.msar.me·Dec 23, 2023Testing in LaravelLaravel's robust framework caters to a developer's desire for efficiency and elegance. But what about assurance, the quiet confidence that your code won't crumble under real-world pressure? That's where testing becomes your knight in shining armor. T...Discuss·1 like·44 readsLaravelFeature Testing
Chris GmyrProchrisgmyr.dev·Sep 26, 2023Improve Your Productivity While Utilizing Laravel MocksLaravel has numerous test helpers and mocks within the framework, which is fantastic. However, I see other engineers getting caught up on debugging issues when they arise. The Laravel docs show this as an example Queue::assertPushed(function (ShipOrd...Discuss·412 readsLaravel
Geni Jahoblog.genijaho.dev·Sep 17, 2023Upgrading to Laravel 10, PHPUnit 10, and Pest 2We're upgrading from Laravel 9 to 10, and PHPUnit 9 to 10, and, if all goes well, we'll top it off by migrating to Pest, the latest version. To keep the positive vibes on I'll skip an upgrade from PHP 8.1 to 8.2, just because I don't want to restart ...Discuss·643 readsRectorPHP
Amadeusz Annissimoannissimo.com·Aug 25, 2023Laravel's HasLocalePreference: Writing PHPUnit Tests for Notifiable's Default LocaleBackground: How to define default Locale for Notifiable Since Laravel 5.7.7, you can set the preferred locale on a Notifiable. In other words, you can define the default locale that will be used for every Notification (or email) sent to a given User ...Discuss·49 readsLaravel
Mohamed Kamelmohamedkamel.hashnode.dev·Aug 7, 2023How to boost your Laravel and PHPUnit testing performancePHPUnit is a testing framework that followed the xUnit framework which is a testing framework that is originally written by Kent Beck. "x" refers to the language such as PHPUnit for PHP or JUnit for Java, and NUnit for .NET, and Unit is the concept. ...Discuss·1 like·170 readsPHP
James Rossflukedit.hashnode.dev·Aug 1, 2023Testing invalid form validation in Laravel using PHPUnitIntroduction One thing I have noticed when reviewing code relating to form validation is that the focus is predominantly on testing the true path, or best-case scenario. By this, I mean that we have a set of business rules that the request must meet,...Discuss·58 readsform validation
Moathmoath.dev·Jul 4, 2023Fake Timeout Exceptions in LaravelIf you're developing a Laravel app that interacts with external services, it's important to ensure that it can handle timeout exceptions gracefully. Fortunately, testing timeout exceptions in your Laravel app is straightforward using the Laravel HTTP...Discuss·584 readsPHP