function DatabaseAlterTestCase::testSimpleAlter
Test that we can do basic alters.
File
-
modules/
simpletest/ tests/ database_test.test, line 2935
Class
- DatabaseAlterTestCase
- Select alter tests.
Code
function testSimpleAlter() {
$query = db_select('test');
$query->addField('test', 'name');
$query->addField('test', 'age', 'age');
$query->addTag('database_test_alter_add_range');
$result = $query->execute();
$num_records = 0;
foreach ($result as $record) {
$num_records++;
}
$this->assertEqual($num_records, 2, 'Returned the correct number of rows.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.