| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 1236 lines (51 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
ContentCrudTestCase:: (17 methods):
setUp()
assertSchemaMatchesTables()
_assertTableNotExists()
_assertSchemaMatches()
_compareArrayForChanges()
assertNodeSaveValues()
assertNodeValues()
assertNodeMissingFields()
createRandomTextFieldData()
loginWithPermissions()
acquireContentTypes()
acquireNodes()
createField()
createFieldText()
updateField()
shareField()
deleteField()
ContentCrudBasicTest:: (3 methods):
getInfo()
setUp()
testBasic()
ContentCrudSingleToMultipleTest:: (3 methods):
getInfo()
setUp()
testSingleToMultiple()
ContentCrudMultipleToSingleTest:: (3 methods):
getInfo()
setUp()
testMultipleToSingle()
ContentUICrud:: (4 methods):
getInfo()
setUp()
testAddFieldUI()
testFieldContentUI()
ContentOptionWidgetTest:: (6 methods):
getInfo()
setUp()
testOnOffCheckbox()
testSelect()
testRadios()
testChecboxes()
Class: ContentCrudTestCase - X-Ref
Base class for CCK CRUD tests.| setUp() X-Ref |
| Enable CCK, Text, and Schema modules. |
| assertSchemaMatchesTables($tables) X-Ref |
| Checks that the database itself and the reported database schema match the expected columns for the given tables. param: $tables An array containing the key 'per_field' and/or the key 'per_type'. |
| _assertTableNotExists($table) X-Ref |
| Helper function for assertSchemaMatchesTables Checks that the given database table does NOT exist param: $table Name of the table to check |
| _assertSchemaMatches($table, $columns) X-Ref |
| Helper function for assertSchemaMatchesTables Checks that the database and schema for the given table contain only the expected fields. param: $table Name of the table to check param: $columns Array of column names |
| _compareArrayForChanges($fields, $data, $message, $prefix = '') X-Ref |
| Helper function for assertNodeSaveValues. Recursively checks that all the keys of a table are present in a second and have the same value. |
| assertNodeSaveValues($node, $values) X-Ref |
| Checks that after a node is saved using node_save, the values to be saved match up with the output from node_load. param: $node Either a node object, or the index of an acquired node param: $values Array of values to be merged with the node and passed to node_save return: The values array |
| assertNodeValues($node, $values) X-Ref |
| Checks that the output from node_load matches the expected values. param: $node Either a node object, or the index of an acquired node (only the nid field is used) param: $values Array of values to check against node_load. The node object must contain the keys in the array, |
| assertNodeMissingFields($node, $fields) X-Ref |
| Checks that the output from node_load is missing certain fields param: $node Either a node object, or the index of an acquired node (only the nid field is used) param: $fields Array containing a list of field names |
| createRandomTextFieldData() X-Ref |
| Creates random values for a text field return: An array containing a value key and a format key |
| loginWithPermissions($permissions = NULL) X-Ref |
| Creates a user / role with certain permissions and then logs in as that user param: $permissions Array containing list of permissions. If not given, defaults to |
| acquireContentTypes($count) X-Ref |
| Creates a number of content types with predictable names (simpletest_t1 ... simpletest_tN) These content types can later be accessed via $this->content_types[0 ... N-1] param: $count Number of content types to create |
| acquireNodes($count = 1) X-Ref |
| Creates a number of nodes of each acquired content type. Remember to call acquireContentTypes() before calling this, else the content types won't exist. param: $count Number of nodes to create per acquired content type (defaults to 1) |
| createField($settings, $content_type = 0) X-Ref |
| Creates a field instance with a predictable name. Also makes all future calls to functions which take an optional field use this one as the default. param: $settings Array to be passed to content_field_instance_create. If the field_name param: $content_type Either a content type object, or the index of an acquired content type return: The newly created field instance. |
| createFieldText($settings, $content_type = 0) X-Ref |
| Creates a textfield instance. Identical to createField() except it ensures that the text module is enabled, and adds default settings of type (text) and widget_type (text_textfield) if they are not given in $settings. |
| updateField($settings, $field = NULL) X-Ref |
| Updates a field instance. Also makes all future calls to functions which take an optional field use the updated one as the default. param: $settings New settings for the field instance. If the field_name or type_name keys param: $field The field instance to update (defaults to the last worked upon field) return: The updated field instance. |
| shareField($new_content_type, $field = NULL) X-Ref |
| Makes a copy of a field instance on a different content type, effectively sharing the field with a new content type. Also makes all future calls to functions which take an optional field use the shared one as the default. param: $new_content_type Either a content type object, or the index of an acquired content type param: $field The field instance to share (defaults to the last worked upon field) return: The shared (newly created) field instance. |
| deleteField($content_type, $field = NULL) X-Ref |
| Deletes an instance of a field. param: $content_type Either a content type object, or the index of an acquired content type (used only param: $field The field instance to delete (defaults to the last worked upon field, used only to get |
Class: ContentCrudBasicTest - X-Ref
Class: ContentCrudSingleToMultipleTest - X-Ref
Class: ContentCrudMultipleToSingleTest - X-Ref
Class: ContentUICrud - X-Ref
| getInfo() X-Ref |
| No description |
| setUp() X-Ref |
| No description |
| testAddFieldUI() X-Ref |
| No description |
| testFieldContentUI() X-Ref |
| No description |
Class: ContentOptionWidgetTest - X-Ref
| getInfo() X-Ref |
| No description |
| setUp() X-Ref |
| No description |
| testOnOffCheckbox() X-Ref |
| On/Off Checkbox, not required: - Create a node with the value checked. - FAILS: Edit the node and uncheck the value. On/Off Checkbox, required: - TODO: what behavior do we want ? |
| testSelect() X-Ref |
| Single select, not required: - TODO: check there's a 'none' choice in the form. - Create a node with one value selected. - Edit the node and unselect the value (selecting '- None -'). Single select, required: - TODO: check there's no 'none' choice in the form. Multiple select, not required: - TODO: check there's a 'none' choice in the form. - Edit the node and select multiple values. - Edit the node and unselect one value. - Edit the node and unselect the values (selecting '- None -'). - Edit the node and unselect the values (selecting nothing). Multiple select, required: - TODO: check there's no 'none' choice in the form. - Check the form doesn't submit when nothing is selected. |
| testRadios() X-Ref |
| Single (radios), not required: - TODO: check there's a 'none' choice in the form. - Create a node with one value selected. - Edit the node and unselect the value (selecting '- None -'). Single (radios), required: - TODO: check there's no 'none' choice in the form. - Check the form doesn't submit when nothing is selected. |
| testChecboxes() X-Ref |
| Multiple (checkboxes), not required: - TODO: check there's no 'none' choice in the form. - Create a node with two values. - Edit the node and select only one value. - Edit the node and unselect the values (selecting nothing). Multiple (checkboxes), required: - TODO: check there's no 'none' choice in the form. - Check the form doesn't submit when nothing is selected. |
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |