CMB2 Documentation
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Hooks
  • Download Docs
  • Github

Packages

  • CMB2
  • Demo
    • CMB2
  • None
  • Tests
    • CMB2

Classes

  • Test_CMB2
  • Test_CMB2_Ajax
  • Test_CMB2_Core
  • Test_CMB2_Field
  • Test_CMB2_JS
  • Test_CMB2_Object
  • Test_CMB2_Options
  • Test_CMB2_REST
  • Test_CMB2_Rest_Base
  • Test_CMB2_REST_Controllers
  • Test_CMB2_REST_Object
  • Test_CMB2_REST_Registered_Fields
  • Test_CMB2_Types
  • Test_CMB2_Types_Base
  • Test_CMB2_Types_Display
  • Test_CMB2_Utils

Exceptions

  • Test_CMB2_Exception

Hooks

  • Hook Reference

Class Test_CMB2_REST_Registered_Fields

Test the REST endpoints

WP_UnitTestCase
Extended by Test_CMB2
Extended by Test_CMB2_Rest_Base
Extended by Test_CMB2_REST_Registered_Fields
Package: Tests\CMB2
License: GPL-2.0+
Author: CMB2 team
Link: https://pantheon.io/blog/test-coverage-your-wp-rest-api-project
Link: https://github.com/danielbachhuber/pantheon-rest-api-demo/blob/master/tests/test-rest-api-demo.php
Group: cmb2-rest-api
Located at tests/test-cmb-rest-registered-fields.php

Methods summary

public
# set_up( )

Set up the test fixture

Set up the test fixture

Overrides

Test_CMB2_Rest_Base::set_up
public
# tear_down( )

Overrides

Test_CMB2_Rest_Base::tear_down
public
# test_rest_posts_controller_exists( )
public
# test_read_post_has_cmb2_data( )
public
# test_update_post_cmb2_data_unauthorized( )
public
# test_update_post_cmb2_data_authorized( )
public
# test_read_user_fields( )
public
# test_update_user_fields( )
public
# test_read_comment_fields( )
public
# test_update_comment_fields( )
public
# test_read_term_fields( )
public
# test_update_term_fields( )
protected
# update_data_authorized( $user, $object_id, $url, $cmb_id, $get_callback = 'get_post_meta' )

Methods inherited from Test_CMB2_Rest_Base

assertRequestResponseStatus(), assertResponseData(), assertResponseErrorCode(), assertResponseStatus(), assertResponseStatuses(), reset_instances(), set_up_and_init()

Methods inherited from Test_CMB2

assertContainsOnlyInstancesOf(), assertHTMLstringsAreEqual(), assertIsDefined(), assertNotFalse(), assertOEmbedResult(), assertOEmbedResultString(), assertVerifiersMatch(), capture_render(), compare_strings(), hook_to_wp_die(), invokeMethod(), is_connected(), normalize_http_string(), normalize_string(), oembed_no_connection_result(), oembed_no_connection_result_verifiers(), oembed_success_result(), oembed_success_result_verifiers(), render_field(), wp_die()

Properties summary

Properties inherited from Test_CMB2

$hooks_to_die

CMB2 Documentation API documentation generated by ApiGen