Development:DB layer 2.0 functional testing: Difference between revisions
From MoodleDocs
(DDL tests) |
|||
Line 29: | Line 29: | ||
* TestRenameField '''Experimental''' | * TestRenameField '''Experimental''' | ||
* TestRenameTable | * TestRenameTable | ||
The following database_manager method still need to be tested: | |||
* table_exists | |||
* field_exists | |||
* index_exists | |||
* find_check_constraint_name | |||
* check_constraint_exists | |||
* find_key_name | |||
* find_sequence_name | |||
* delete_tables_from_xmldb_file | |||
* install_from_xmldb_file | |||
* create_temp_table | |||
Additionally, the tests need to be expanded to include boundary conditions, including invalid or incomplete parameters. | |||
* How do these methods behave when given invalid params? | |||
* Are exceptions in place, and are they caught appropriately? |
Revision as of 07:22, 20 May 2008
Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.
Template:Development:dmllib 2.0
DDL tests
Based on tests already used in xmldb, the following have been implemented in simpletest:
- TestCreateTable
- TestDropTable
- TestAddEnumField
- TestAddNumericField
- TestDropField
- TestChangeFieldType
- TestChangeFieldPrecision
- TestChangeFieldSign
- TestChangeFieldNullability
- TestChangeFieldDefault
- TestAddUniqueIndex
- TestAddNonUniqueIndex
- TestFindIndexName
- TestDropIndex
- TestAddUniqueKey
- TestAddForeignUniqueKey
- TestDropKey
- TestAddForeignKey
- TestDropForeignKey
- TestChangeFieldEnum
- TestRenameIndex
- TestRenameKey Experimental
- TestRenameField Experimental
- TestRenameTable
The following database_manager method still need to be tested:
- table_exists
- field_exists
- index_exists
- find_check_constraint_name
- check_constraint_exists
- find_key_name
- find_sequence_name
- delete_tables_from_xmldb_file
- install_from_xmldb_file
- create_temp_table
Additionally, the tests need to be expanded to include boundary conditions, including invalid or incomplete parameters.
- How do these methods behave when given invalid params?
- Are exceptions in place, and are they caught appropriately?