PHP Class WP_Canonical_UnitTestCase

Inheritance: extends WP_UnitTestCase
Afficher le fichier Open project: lucatume/wp-browser Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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 méthode

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 méthode

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

generate_shared_fixtures() public static méthode

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 méthode

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 méthode

public setUp ( )

Property Details

$author_id static_oe public_oe property

static public $author_id

$comment_ids static_oe public_oe property

static public $comment_ids

$old_current_user static_oe public_oe property

static public $old_current_user

$old_options static_oe public_oe property

static public $old_options

$post_ids static_oe public_oe property

static public $post_ids

$structure public_oe property

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

$term_ids static_oe public_oe property

static public $term_ids

$terms static_oe public_oe property

static public $terms