프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$default_generation_definitions | |||
$factory |
메소드 | 설명 | |
---|---|---|
__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 ) |
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}. |
public generate_args ( $args = [], $generation_definitions = null, &$callbacks = null ) |