Skip to content

Releases: rmp-up/wp-fixtures

Meta-Input hotfix and WP_Object_Cache support

17 Nov 14:05
Compare
Choose a tag to compare
  • Some meta_input did not persist correctly
  • Added support for the WP_Object_Cache class

Real WordPress entities

05 Jun 17:13
Compare
Choose a tag to compare

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

16 Dec 02:10
Compare
Choose a tag to compare

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

14 Dec 13:36
f192ffa
Compare
Choose a tag to compare
  • PHP 7.4
  • WordPress 5.3
  • WooCommerce 3.8

0.6.1

11 Sep 16:18
d3c4ab6
Compare
Choose a tag to compare
Fix: Reuse bundle ID for adding products

Fixture for WordPress options

11 Sep 08:37
Compare
Choose a tag to compare

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

10 Sep 06:52
4585377
Compare
Choose a tag to compare

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