See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401]
Data generators for acceptance testing.
Copyright: | 2012 David MonllaĆ³ |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 248 lines (10 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 1 file lib/behat/behat_base.php |
behat_data_generators:: (7 methods):
the_following_entities_exist()
the_following_repeated_entities_exist()
the_following_entity_exists()
parse_entity_type()
get_instance_for_component()
get_all_entities()
get_entity()
Class: behat_data_generators - X-Ref
Class to set up quickly a Given environment.the_following_entities_exist($entitytype, TableNode $data) X-Ref |
Creates the specified elements. See the class comment for an overview. param: string $entitytype The name of the type entity to add param: TableNode $data |
the_following_repeated_entities_exist(string $entitytype, int $count, TableNode $data) X-Ref |
Create multiple entities of one entity type. param: string $entitytype The name of the type entity to add param: int $count param: TableNode $data |
the_following_entity_exists($entitytype, TableNode $data) X-Ref |
Creates the specified (singular) element. See the class comment for an overview. param: string $entitytype The name of the type entity to add param: TableNode $data |
parse_entity_type(string $entitytype) X-Ref |
Parse a full entity type like 'users' or 'mod_forum > subscription'. E.g. parsing 'course' gives ['core', 'course'] and parsing 'core_message > message' gives ['core_message', 'message']. param: string $entitytype the entity type return: string[] with two elements, component and entity type. |
get_instance_for_component(string $component) X-Ref |
Get an instance of the appropriate subclass of this class for a given component. param: string $component The name of the component to generate entities for. return: behat_generator_base the subclass of this class for the requested component. |
get_all_entities() X-Ref |
Get all entities that can be created in all components using the_following_entities_exist() return: array |
get_entity(string $entitytype) X-Ref |
Get the required fields for a specific creatable entity. param: string $entitytype return: mixed |