Author: Fränk Klein
-
Understanding WordPress PHP Unit Test Fixture Setup and Teardown
When I get started writing unit tests in WordPress, I continuously ran into what seemed to be strange behaviours by the WordPress Unit Testing framework. Strange when comparing to other PHP…
-
WP_UnitTest_Factory: The Missing Documentation
The WP_UnitTestCase class has a factory() method that gives access to the WP_UnitTest_Factory factory classes. And it’s these classes that you use to create data objects (called fixtures) like posts,…
-
How To Make Your Code More Readable By Using Early Returns
A step by step refactoring of a function to use early returns. This technique makes the code easier to read and understand.
-
Block Editor Color Settings: The Ultimate Guide
The block editor color settings interface allows users to customize the colors of a block. This includes the: In this article, we’ll first look at what these color settings are,…
-
Code Review Checklist
Code review has been an integral part of my career as a developer. Whether it in the beginning through reviewing themes for WordPress.org, reviewing client code at WordPress.com VIP, or…
-
The Guide to WordPress Unit Testing Assertions
The WordPress Unit Testing Framework contains a set of custom assertion helper methods which help with writing unit test. In this post, we’ll present these helper methods available through the…