PHP Class Codeception\TestCase\WPCanonicalTestCase

Inheritance: extends WPTestCase
Show file Open project: lucatume/wp-browser

Public Properties

Property Type Description
$author_id
$comment_ids
$old_current_user
$old_options
$post_ids
$structure Those tests will be run against the specified permastruct.
$term_ids
$terms

Public Methods

Method Description
assertCanonical ( string $test_url, string $expected, integer $ticket, array $expected_doing_it_wrong = [] ) Assert that a given URL is the same a the canonical URL generated by WP.
delete_shared_fixtures ( ) Clean up shared fixtures.
generate_shared_fixtures ( $factory ) Generate fixtures to be shared between canonical tests.
get_canonical ( string $test_url ) Get the canonical URL given a raw URL.
setUp ( )

Method Details

assertCanonical() public method

Assert that a given URL is the same a the canonical URL generated by WP.
Since: 4.1.0
public assertCanonical ( string $test_url, string $expected, integer $ticket, array $expected_doing_it_wrong = [] )
$test_url string Raw URL that will be run through redirect_canonical().
$expected string Expected string.
$ticket integer Optional. Trac ticket number.
$expected_doing_it_wrong array Array of class/function names expected to throw _doing_it_wrong() notices.

delete_shared_fixtures() public static method

Clean up shared fixtures.
Since: 4.1.0
public static delete_shared_fixtures ( )

generate_shared_fixtures() public static method

Abstracted here because it's invoked by setUpBeforeClass() in more than one class.
Since: 4.1.0
public static generate_shared_fixtures ( $factory )

get_canonical() public method

Get the canonical URL given a raw URL.
public get_canonical ( string $test_url )
$test_url string Should be relative to the site "front", ie /category/uncategorized/ as opposed to http://example.com/category/uncategorized/

setUp() public method

public setUp ( )

Property Details

$author_id static public property

static public $author_id

$comment_ids static public property

static public $comment_ids

$old_current_user static public property

static public $old_current_user

$old_options static public property

static public $old_options

$post_ids static public property

static public $post_ids

$structure public property

Those tests will be run against the specified permastruct.
public $structure

$term_ids static public property

static public $term_ids

$terms static public property

static public $terms