Releases: rmp-up/wp-fixtures
Releases · rmp-up/wp-fixtures
Meta-Input hotfix and WP_Object_Cache support
Real WordPress entities
This is the most useful release that solves the problem with custom entities and uses the given ones instead:
- WP_Comment
- WP_Post
- WP_Role
- WP_Site
- WP_Term
- WP_User
From now on you can create tons of WP_Post instances to use them for your unit testing:
WP_Post:
post_title: <sentence()>
Initializing generator
Now got generator <wpPost()>
for random posts
and <wpUser()>
for a random newly created user.
Note: This data will be stored in the database.
Raised supported versions of packages
- PHP 7.4
- WordPress 5.3
- WooCommerce 3.8
0.6.1
Fixture for WordPress options
Setting options in the database:
\RmpUp\WordPress\Fixtures\Entity\Option:
default:
home_url_perhaps: 'https://example.org'
some_plugin_api_token: afbdec456ddebdc84
You can also use this to assert which plugin is currently active:
\RmpUp\WordPress\Fixtures\Entity\Option:
default:
active_plugins:
- hello-dolly.php
- classic-editor/classic-editor.php
- duplicate-post/duplicate-post.php
User-Meta
You can now seed the database with user meta-data:
\RmpUp\WordPress\Fixtures\Entity\User:
some_meta_data:
user_email: [email protected]
meta_input:
locale: fr_FR
show_welcome_panel: 0
dismissed_wp_pointers: wp496_privacy
admin_color: fresh
nobility: prince