Download the PHP package gin0115/wpunit-helpers without Composer
On this page you can find all versions of the php package gin0115/wpunit-helpers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gin0115/wpunit-helpers
More information about gin0115/wpunit-helpers
Files in gin0115/wpunit-helpers
Package wpunit-helpers
Short Description A series of helper classes, functions and traits for testing with WPUnit for WordPress
License MIT
Homepage https://pinkcrab.co.uk
Informations about the package wpunit-helpers
WPUnit_Helpers
Collection of helper functions, classes and traits for using WPUnit.
Version
1.0.8
Setup
Meta Box Inspector
Check if meta boxes have been registered correctly, check all values and render the view callback.
Read More
Menu Page Inspector
Allows for the checking of added pages and sub pages. Can be searched to ensure pages are added as expected and can render the pages content, for intergration style tests. Allows for testing parent and child(sub) pages.
Read More
Meta Data Inspector
Allows for the checking of registered meta data, for either post, term, user, comment and any other custom meta type added.
Read More
WP Dependencies
Allows for the quick and simple installation of themes and plugins from remote sources.
Read More
Object (Reflection wrappers)
Reflection is super useful in testing, especially if you cant access internal properties and methods to create your tests. Or you need to mock parts of the process, which are otherwise not accessible (internal WP States etc). These also work on static methods/properties
Read More
Utils
A collection of functions that have no other real place.
Read More
Output
There are a number of methods that can be used to capture output from a function or method. This is useful for testing output from a function or method.
Read More
Logable WPDB
This simple class which extends wpdb
can be used for Application tests where you need to either mock the return from a WPDB call or log all wpdb calls made.
Supports all public and common methods.
Read More
WP Unit TestCase Helper Traits
These traits are designed to be used with the WP Unit TestCase. They provide a number of helper functions to make testing easier.
Read More
Change log
- 1.1.1 - Updates dependencies, added in missing docs, missing tests and renamed the
array_map_with
toiterable_map_with
to better reflect the use case. - 1.1.0 - Replaced all instance of pipe() from Function_Constructors with compose() from Function_Constructors.
- 1.0.7 - Updated dependencies for Function_Constructors and testing.
- 1.0.6 - Added Logable WPDB, Extended Meta Data Inspector to make use of Comment Meta, Extended to PHP8.1 Support
- 1.0.5 - Update dependencies for php8, also added
plugin_installed
andplugin_active
toWP_Dependencies
- 1.0.4 - Update all dependencies
- 1.0.3 - Clear up issue with the errors found in 1.0.2 but not in dev
- 1.0.2 - Uses menu_page_url for menu page urls and Menu_Page_Inspector given find_group function as the current naming is confusing
- 1.0.1 - Added in Meta_Data_Inspector for checking all registered meta data.
- 1.0.0 - Most in place now, still needs more docs and some extra tests on output.
All versions of wpunit-helpers with dependencies
pinkcrab/function-constructors Version *
automattic/jetpack-constants Version *