Jump to content

I created a bunch of PEST (PHPUnit) tests for the Invoices site profile


Sergio
 Share

Recommended Posts

Hello there friends,

As a learning challenge, with Claude Sonnet AI's help, I installed the PEST testing framework and created a bunch of tests for Ryan's Invoices site profile. I'm pretty happy with it. 🙂🙂

You can check the project on GitHub: https://github.com/sjardim/processwire-invoices-with-pest

To try it, just install the site profile on a fresh PW project as instructed here: https://processwire.com/blog/posts/invoices-site-profile/ and copy my project's :

  • the entire /test folder,
  • phpunit.xml file
  • and composer.json file

and install composer dependencies. Next, in your terminal, run `./vendor/bin/pest --filter=InvoicePageTest` to see the magic.

Here's a preview of the InvoicePageTest class:
 

  Reveal hidden contents

I hope this help you in your testing journey!

 

Edited by Sergio
Add tags
  • Like 5
  • Thanks 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...