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

CMB2 tests base

WP_UnitTestCase
Extended by Test_CMB2

Direct known subclasses

Test_CMB2_Ajax, Test_CMB2_Core, Test_CMB2_Field, Test_CMB2_Options, Test_CMB2_Rest_Base, Test_CMB2_Types_Base, Test_CMB2_Utils

Indirect known subclasses

Test_CMB2_REST, Test_CMB2_REST_Controllers, Test_CMB2_REST_Registered_Fields, Test_CMB2_Types, Test_CMB2_Types_Display

Abstract
Package: Tests\CMB2
License: GPL-2.0+
Author: CMB2 team
Link: https://cmb2.io
Located at tests/cmb-tests-base.php

Methods summary

public
# set_up( )

Set up the test fixture

Set up the test fixture

public
# tear_down( )
public
# normalize_string( $string )
public
# is_connected( )
protected
# oembed_success_result( $args )
protected
# oembed_success_result_verifiers( $args )
protected
# oembed_no_connection_result( $url )
protected
# oembed_no_connection_result_verifiers( $url )
public
# assertOEmbedResult( $args )
protected
# assertOEmbedResultString( $args, $actual )
protected
# assertVerifiersMatch( $result_verifiers, $actual )
public
# normalize_http_string( $string )
protected
# capture_render( $cb )
protected
# render_field( $field )
protected
# hook_to_wp_die( $hook )
public
# wp_die( )
public static
# compare_strings( $orig_string, $new_string, $orig_label = 'Expected', $compare_label = 'Actual' )
public mixed
# invokeMethod( object $object, string $methodName )

Call protected/private method of a class.

Call protected/private method of a class.

Parameters

$object
Instantiated object that we will run method on.
$methodName
Method name to call

Returns

mixed
Method return.
public
# assertHTMLstringsAreEqual( $expected_string, $string_to_test, $msg = null )
public
# assertIsDefined( $definition )
public static
# assertNotFalse( $condition, $message = '' )

Backport assertNotFalse to PHPUnit 3.6.12 which only runs in PHP 5.2

Backport assertNotFalse to PHPUnit 3.6.12 which only runs in PHP 5.2

Link

https://github.com/woothemes/woocommerce/blob/f5ff10711dc664f1c5ec5277634a5eea2b828765/tests/framework/class-wc-unit-test-case.php
public static
# assertContainsOnlyInstancesOf( $classname, $haystack, $message = '' )

Backport assertContainsOnlyInstancesOf to PHPUnit 3.6.12 which only runs in PHP 5.2

Backport assertContainsOnlyInstancesOf to PHPUnit 3.6.12 which only runs in PHP 5.2

Properties summary

public array $hooks_to_die
# array()
CMB2 Documentation API documentation generated by ApiGen