PHP Класс WP_Canonical_UnitTestCase

Наследование: extends WP_UnitTestCase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$author_id
$comment_ids
$old_current_user
$old_options
$post_ids
$structure Those tests will be run against the specified permastruct.
$term_ids
$terms

Открытые методы

Метод Описание
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 ( )

Описание методов

assertCanonical() публичный Метод

Assert that a given URL is the same a the canonical URL generated by WP.
С версии: 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() публичный статический Метод

Clean up shared fixtures.
С версии: 4.1.0
public static delete_shared_fixtures ( )

generate_shared_fixtures() публичный статический Метод

Abstracted here because it's invoked by setUpBeforeClass() in more than one class.
С версии: 4.1.0
public static generate_shared_fixtures ( $factory )

get_canonical() публичный Метод

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 setUp ( )

Описание свойств

$author_id статическое публичное свойство

static public $author_id

$comment_ids статическое публичное свойство

static public $comment_ids

$old_current_user статическое публичное свойство

static public $old_current_user

$old_options статическое публичное свойство

static public $old_options

$post_ids статическое публичное свойство

static public $post_ids

$structure публичное свойство

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

$term_ids статическое публичное свойство

static public $term_ids

$terms статическое публичное свойство

static public $terms