---
title: "Discussion on \"Trick to prevent unit tests from touching the database in Laravel\" | Hashnode"
description: "Discussion on \"Trick to prevent unit tests from touching the database in Laravel\". Stop letting your unit tests interact with DB unknowingly and slow tests down"
url: "https://hashnode.com/posts/trick-to-prevent-unit-tests-from-touching-the-database-in-laravel/631c252bf73f4734bc0531c8"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Trick to prevent unit tests from touching the database in Laravel](https://blog.freshbits.in/trick-to-prevent-unit-tests-from-touching-the-database-in-laravel?utm_source=hashnode&utm_medium=feed)

Stop letting your unit tests interact with DB unknowingly and slow tests down

Sep 10, 2022 · 3 min read · blog.freshbits.in  
Read the article

-   [#testing](https://hashnode.com/tag/testing)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#laravel](https://hashnode.com/tag/laravel)
-   [#ci-cd](https://hashnode.com/tag/ci-cd)
-   [#test-driven-development](https://hashnode.com/tag/test-driven-development)

## Written by

[Freshbits Web Solutions](https://hashnode.com/@freshbitsweb)

@freshbitsweb · India

  
[View profile](https://hashnode.com/@freshbitsweb)

Elegant Web apps and Powerful backend systems for the leading companies of the age

Looking for more users to your website? Or more sales? Our custom digital solutions can help you grow your business. If you are looking for a team that can quickly craft a working solution for your next venture; Or if your existing solution is not matching with the standards of your business, let us discuss .

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
