| 7 schema.test | SchemaTestCase::checkSchemaComment($description, $table, $column = NULL) |
| 8 schema.test | SchemaTestCase::checkSchemaComment($description, $table, $column = NULL) |
Checks that a table or column comment matches a given description.
Parameters
$description: The asserted description.
$table: The table to test.
$column: Optional column to test.
File
- modules/
simpletest/ tests/ schema.test, line 162 - Tests for the Database Schema API.
Code
function checkSchemaComment($description, $table, $column = NULL) {
if (method_exists(Database::getConnection()->schema(), 'getComment')) {
$comment = Database::getConnection()->schema()->getComment($table, $column);
$this->assertEqual($comment, $description, t('The comment matches the schema description.'));
}
}
Login or register to post comments