In this previous video, I used Plugin Machine to make a plugin that added a custom database table and had a "CRUD" class to serve as the database API. I used integration tests, which run with phpunit and WordPress, in a Docker container. This allowed me to test that my data is being saved correctly, with a real database.
This video uses the same code, and is about using tests to help with the process of abstracting code. I walk through the process of creating an abstract "CRUD" class and modifying it so it can be reused with a second table. Using the tests to help me fix what I break along the way, I refactored the original class, which worked but needed improvement, into a reusable API.
🌲 Part 1: • WordPress Integration Testing By Exam...
🌲 Plugin Machine PHP Testing Documentation: https://pluginmachine.com/blog/doc/ph...
🌲 Automated Testing In WordPress, an introduction: https://infinum.com/handbook/wordpres...
In questa pagina del sito puoi guardare il video online WordPress Integration Testing By Example: Custom Database Table CRUD Part 2 della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Plugin Machine 28 gennaio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 50 volte e gli è piaciuto 1 spettatori. Buona visione!