1 database_test.test DatabaseAlterTestCase::testSimpleAlter()

Test that we can do basic alters.

File

core/modules/simpletest/tests/database_test.test, line 2606
Database tests.

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.');
}