PHP Class WP_UnitTest_Factory_For_Thing

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

Méthodes publiques

Свойство Type Description
$default_generation_definitions
$factory

Méthodes publiques

Méthode Description
__construct ( object $factory, array $default_generation_definitions = [] ) Creates a new factory, which will create objects of a specific Thing
addslashes_deep ( $value )
apply_callbacks ( $callbacks, $created )
callback ( $function )
create ( $args = [], $generation_definitions = null )
create_and_get ( $args = [], $generation_definitions = null )
create_many ( $count, $args = [], $generation_definitions = null )
create_object ( $args )
generate_args ( $args = [], $generation_definitions = null, &$callbacks = null )
get_object_by_id ( $object_id )
update_object ( $object, $fields )

Method Details

__construct() public méthode

Creates a new factory, which will create objects of a specific Thing
public __construct ( object $factory, array $default_generation_definitions = [] )
$factory object Global factory that can be used to create other objects on the system
$default_generation_definitions array Defines what default values should the properties of the object have. The default values can be generators -- an object with next() method. There are some default generators: {@link WP_UnitTest_Generator_Sequence}, {@link WP_UnitTest_Generator_Locale_Name}, {@link WP_UnitTest_Factory_Callback_After_Create}.

addslashes_deep() public méthode

public addslashes_deep ( $value )

apply_callbacks() public méthode

public apply_callbacks ( $callbacks, $created )

callback() public méthode

public callback ( $function )

create() public méthode

public create ( $args = [], $generation_definitions = null )

create_and_get() public méthode

public create_and_get ( $args = [], $generation_definitions = null )

create_many() public méthode

public create_many ( $count, $args = [], $generation_definitions = null )

create_object() abstract public méthode

abstract public create_object ( $args )

generate_args() public méthode

public generate_args ( $args = [], $generation_definitions = null, &$callbacks = null )

get_object_by_id() abstract public méthode

abstract public get_object_by_id ( $object_id )

update_object() abstract public méthode

abstract public update_object ( $object, $fields )

Property Details

$default_generation_definitions public_oe property

public $default_generation_definitions

$factory public_oe property

public $factory