Differences Between: [Versions 310 and 311] [Versions 39 and 311]
(no description)
File Size: | 282 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
import_test:: (7 methods):
setUp()
get_test_data()
test_import()
test_import_with_userdata()
test_import_with_field_username()
test_import_with_field_username_without_userdata()
get_data_records()
Class: import_test - X-Ref
Unit tests for import.php.setUp() X-Ref |
Set up function. |
get_test_data() X-Ref |
Get the test data. In this instance we are setting up database records to be used in the unit tests. return: array |
test_import() X-Ref |
Test uploading entries for a data instance without userdata. |
test_import_with_userdata() X-Ref |
Test uploading entries for a data instance with userdata. At least one entry has an identifiable user, which is assigned as author. |
test_import_with_field_username() X-Ref |
Test uploading entries for a data instance with userdata and a defined field 'Username'. This should test the corner case, in which a user has defined a data fields, which has the same name as the current lang string for username. In that case, the first Username entry is used for the field. The second one is used to identify the author. |
test_import_with_field_username_without_userdata() X-Ref |
Test uploading entries for a data instance with a field 'Username' but only one occurrence in the csv file. This should test the corner case, in which a user has defined a data fields, which has the same name as the current lang string for username. In that case, the only Username entry is used for the field. The author should not be set. |
get_data_records(int $dataid) X-Ref |
Returns the records of the data instance. Each records has an item entry, which contains all fields associated with this item. Each fields has the parameters name, type and content. param: int $dataid Id of the data instance. return: array The records of the data instance. |