Skip to content

Instantly share code, notes, and snippets.

@ryanwelcher
Last active December 8, 2016 13:46
Show Gist options
  • Save ryanwelcher/0738af9d078e354071ce to your computer and use it in GitHub Desktop.
Save ryanwelcher/0738af9d078e354071ce to your computer and use it in GitHub Desktop.
Docblock for WordPress PHPUnit dataProvider
/**
*
* Data provider
*
* Description
*
* @see {method name receiving data}
*
* @since x.x.x
*
* @otherPHPUnitSpecificItems
*
* @return array {
* @type type $param_name_in_receiving_method Desciption.
* @type type $param_name_in_receiving_method Very long description that gets
* wrapped to the starting point.
* }
*
*/
EXAMPLE::
/**
*
* Data provider
*
* Provides various post_args to induce error messages in the that can be
* compared to the expected_results.
*
* @see test_ajax_load_available_items_error_messages
*
* @since 4.3
*
* @return array {
* @type array $post_args The arguments that will merged with the $_POST array.
* @type array $expected_results The expected results from the ajax call
* }
*
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment