[oik] plugins.com

WordPress plugins and themes

  • Home
  • About
    • lazy shortcodes
    • smart shortcodes
    • oik base plugin
      • oik – donate
      • oik PayPal buttons
      • oik installation
      • oik Button Shortcode button
      • oik changelog
      • oik FAQ
      • oik plugins on SVN
      • oik plugins on GitHub
  • Plugins
    • oik base plugin
    • FREE oik plugins
    • WordPress plugins
    • Premium oik plugins
    • Bespoke oik plugins
  • Shortcodes
    • Shortcode examples
  • Blocks
    • Block examples
  • APIs
    • ALL action and filter hooks
  • Blog

oik-batch v0.9.2

oik-batch v0.9.2 supports in situ PHPUnit testing of internationalization and localization of plugins.

New methods for PHPUnit testing

Implemented in the BW_UnitTestCase class, which extends WP_UnitTestCase that’s provided in bobbingwide/wordpress-develop-tests.

Helper method Purpose
arraytohtml Reduce a print_r’ed string
assertArrayEqualsFile Asserts that the HTML array equals the file
find_test_name Finds the test name from the call stack
generate_expected_file Helps to generate the expected file from actual test output
generated_expected Help to generate the expected array from actual test output
prepareExpectedArray Converts to an array if required
prepareFile Returns the expected file name
query_la_CY Queries the currently set locale
reload_domains reload domains and enable Just Translate It
replace_admin_url replaces instances of admin_url() in $expected
replace_antispambot Replace randomised antispambot’d mailto links with known value
replace_between Generalised string replace between before and after strings
replace_created_nonce Replaces the created nonce with nonsense
replace_home_url replaces instances of `home_url()` and `site_url()` in `$expected`
replace_nonse_with_nonsense Generalises WordPress generated hidden input nonce fields
replace_oik_url replaces instances of oik_url() in generated HTML
replace_post_id replaces instances of `”post=” . $post->ID` with `”post=42″`
switch_to_locale Switch to a selected locale and reload domains
tag_break Inserts new line between tags then converts into an array

Changes

Change Reference
Changed: Added helper methods for PHPUnit testing of internationalization/localization bobbingwide/oik-batch#24
Fixed: ALTER TABLE %s engine=%s musn’t have quotes around the table or engine value bobbingwide/oik-batch#17
Fixed: Avoid notice when $_SERVER[‘SERVER_PROTOCOL’] not set bobbingwide/oik-batch#25
Tested: With PHP 7.0 and 7.1 bobbingwide/oik-batch#18
Tested: With WordPress 4.8.2 and 4.9-beta3

Published: October 25, 2017 | Last updated: October 25, 2017

Information

Version: 0.9.2
Plugin: oik-batch
Required version: 4.8
Compatible up to: 4.9-beta3
Download oik-batch version 1.0.0
Download oik-batch version 0.9.2

Plugins

  • All Plugins
  • oik base plugin
  • FREE oik plugins
  • WordPress plugins
  • Premium oik plugins

Themes

  • FREE themes
  • Bespoke themes
  • Premium themes

Blocks

  • All Blocks
  • Block examples
  • About Blocks

Shortcodes

  • All Shortcodes
  • Shortcode examples
  • About Shortcodes

Reference

  • About APIs
  • All APIs
  • All Classes
  • All Files
  • All Hooks

Support

  • Contact
  • Cookies policy
  • Get API key
  • Privacy
  • Request support
  • Sitemap
  • Stay informed
  • Terms and Conditions
oik-plugins
Email: [email protected]

Weight shipping plugins

Find out which cart weight shipping plugin you need for your WooCommerce site.
Which cart weight based plugin do I need?

Site:  www.oik-plugins.com
© Copyright oik-plugins 2011-2021. All rights reserved.


Website designed and developed by Herb Miller of Bobbing Wide
Proudly powered by WordPress and oik-plugins