Laravel Tutorials

Building an Intermediary Laravel App

Published

Jesse Schutt has a new tutorial on the Zaengle blog with how they created an intermediary Laravel app to sit between an existing CMS and an Email service.

The tutorial covers the initial requirements, how they solved problem, and code samples to show some of the tests.

I also like how Jesse explained out the “don’t mock what you do not own” aspect. I’ve been doing this on a new app by modifying the phpunit.xml to something like this:

<testsuites>
<testsuite name="acceptance">
<directory>./tests/acceptance/</directory>
</testsuite>
<testsuite name="unit">
<directory>./tests/unit/</directory>
</testsuite>
<testsuite name="integration">
<directory>./tests/integration/</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>integration</group>
</exclude>
</groups>

That way all the manual tests are skipped but are still there and can be easily ran by specifying the suite:

phpunit --testsuite integration

If you have a nicer solution let me know in the comments.

Eric L. Barnes photo

Eric is the creator of Laravel News and has been covering Laravel since 2012.

Sponsored

serpapi logo
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi

The latest

View all →
Agent Run Observability in Laravel AI SDK 0.11 image

Agent Run Observability in Laravel AI SDK 0.11

Read article
Debounced Queued Event Listeners in Laravel image

Debounced Queued Event Listeners in Laravel

Read article
Statamic Mailables Viewer Previews Laravel Emails in the Control Panel image

Statamic Mailables Viewer Previews Laravel Emails in the Control Panel

Read article
Laravel Tackle: Run an AI Coding Agent in Your Laravel App image

Laravel Tackle: Run an AI Coding Agent in Your Laravel App

Read article
Queue::forward(): Reroute Laravel Queues in One Place image

Queue::forward(): Reroute Laravel Queues in One Place

Read article
Laravel Read-Through Filesystem: Lazy Storage Migration image

Laravel Read-Through Filesystem: Lazy Storage Migration

Read article