function SchemaTestCase::checkSchemaComment in SimpleTest 7
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.
1 call to SchemaTestCase::checkSchemaComment()
- SchemaTestCase::testSchema in tests/
schema.test
File
- tests/
schema.test, line 124 - Tests for the Database Schema API.
Class
- SchemaTestCase
- Unit tests for the 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.'));
}
}