Move all files to sculpin/
This commit is contained in:
parent
c5d71803a5
commit
0f61b4e9ee
1514 changed files with 0 additions and 0 deletions
26
sculpin/source/_posts/2024-01-20.md
Normal file
26
sculpin/source/_posts/2024-01-20.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: PHPUnit or Pest?
|
||||
date: 2024-01-20
|
||||
permalink: daily/2024/01/20/phpunit-or-pest
|
||||
snippet: |
|
||||
Which testing framework do you prefer? PHPUnit or Pest?
|
||||
tags:
|
||||
- software-development
|
||||
- automated-testing
|
||||
- test-driven-development
|
||||
- php
|
||||
---
|
||||
|
||||
A recent discussion has started about which testing framework should be the default one used in Laravel.
|
||||
|
||||
PHPUnit or Pest.
|
||||
|
||||
I've used both, and I like both.
|
||||
|
||||
I'm more familiar with classes, object-orientated code and PHPUnit, but for people who are more familiar with JavaScript and the Jest testing framework, Pest may be the better option.
|
||||
|
||||
Its expectation API, where you can chain multiple assertions on the same expectation, is helpful, although I don't mind some repetition in PHPUnit tests.
|
||||
|
||||
Pest tests can become abstract, especially with some of their one-line example tests.
|
||||
|
||||
Whether you pick PHPUnit, Pest or another framework like Behat or Codeception, the main thing is you're taking the time to write automated tests for your code, which is valuable whichever testing tool you use.
|
Loading…
Add table
Add a link
Reference in a new issue