32 lines
709 B
Markdown
32 lines
709 B
Markdown
|
---
|
||
|
title: PHPUnit or Pest?
|
||
|
date: 2024-10-19
|
||
|
permalink: daily/2024/10/19/phpunit-or-pest
|
||
|
tags:
|
||
|
- software-development
|
||
|
- php
|
||
|
- automated-testing
|
||
|
- test-driven-development
|
||
|
cta: ~
|
||
|
snippet: |
|
||
|
PHPUnit or Pest? Which do you prefer?
|
||
|
---
|
||
|
|
||
|
This is a common question from people starting to write automated tests in PHP:
|
||
|
|
||
|
> Should I use PHPUnit or Pest PHP?
|
||
|
|
||
|
I've used both.
|
||
|
|
||
|
They both have pros and cons.
|
||
|
|
||
|
If you're familiar with JavaScript and Jest, Pest would probably be a natural fit.
|
||
|
|
||
|
If you're used to writing classes in PHP, PHPUnit may feel more familiar.
|
||
|
|
||
|
Use whichever appeals to you.
|
||
|
|
||
|
Maybe try both and see which you prefer.
|
||
|
|
||
|
The main benefit will be you have tests, whichever you decide to use.
|