WordPress Integration Testing By Example: Custom Database Table CRUD
In this video, I show how I use WordPress integration tests -- tests that use phpunit and run with WordPress and MySQL loaded -- to create a CRUD class in a WordPress plugin. Because the class I am writing interacts directly with the database, I do not believe "pure" unit tests with a database mock are useful. I want to know if the data is saved and if it is saved correctly, so I read and write data from the database to test it.
🌲✨Update✨ I published part two of this video, which covers abstracting the code created in this video, into a reusable database API - https://youtu.be/SmyG8HCI03k✨
🌲 Plugin Machine PHP Testing Documentation: https://pluginmachine.com/blog/doc/php-testing/
🌲 Automated Testing In WordPress, an introduction: https://infinum.com/handbook/wordpress/automated-testing-in-wordpress/introduction
Видео WordPress Integration Testing By Example: Custom Database Table CRUD канала Plugin Machine
🌲✨Update✨ I published part two of this video, which covers abstracting the code created in this video, into a reusable database API - https://youtu.be/SmyG8HCI03k✨
🌲 Plugin Machine PHP Testing Documentation: https://pluginmachine.com/blog/doc/php-testing/
🌲 Automated Testing In WordPress, an introduction: https://infinum.com/handbook/wordpress/automated-testing-in-wordpress/introduction
Видео WordPress Integration Testing By Example: Custom Database Table CRUD канала Plugin Machine
Комментарии отсутствуют
Информация о видео
27 января 2022 г. 19:00:01
00:34:27
Другие видео канала



















