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}. |