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_Controllers

Test the REST endpoints

WP_UnitTestCase
Extended by Test_CMB2
Extended by Test_CMB2_Rest_Base
Extended by Test_CMB2_REST_Controllers
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
Todo: More Tests for maybe_hook_registered_callback.
Group: cmb2-rest-api
Located at tests/test-cmb-rest-controllers.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_get_schema( )
public
# test_read_boxes( )
public
# test_read_box( )
public
# test_read_box_with_read_permissions_callback( )

Expectedexception

WPDieException
public
# test_read_box_fields( )
public
# test_read_box_field( )
public
# test_read_box_field_filter( )
public
# test_read_box_field_with_read_permissions_callback( )

Expectedexception

WPDieException
public
# test_read_box_field_with_value( )
public
# test_update_unauthorized_for_subscriber( )
public
# test_update_bad_request_for_admin( )
public
# test_update_authorized_for_admin( )
public
# test_delete_unauthorized_for_subscriber( )
public
# test_delete_bad_request_for_admin( )
public
# test_delete_authorized_for_admin( )
protected static
# auth_required_code( )

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