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

Test the REST endpoints

WP_UnitTestCase
Extended by Test_CMB2
Extended by Test_CMB2_Rest_Base
Extended by Test_CMB2_REST
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.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_construction( )
public
# test_declare_read_edit_fields( )
public
# test_is_readable( )
public
# test_is_editable( )
protected
# do_scenarios_test( $scenarios, $function )
public
# test_field_is_readable( )
public
# test_field_is_editable( )
public
# test_field_is_readable_and_editable( )
protected
# read_assertions( $rest_box )
protected
# edit_assertions( $rest_box )
public
# test_field_can_read( )
public
# test_field_can_edit( )
public
# test_get_object_id( )
public
# test_get_rest_box( )
public
# test_get_rest_values( )
public
# test_update_rest_values( )
protected
# confirm_get_rest_values( $expected )
protected
# scenario_fail_message( $label, $is_readable, $check )
protected
# get_read_scenarios( )
protected
# get_edit_scenarios( )

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