You are here

function DatabaseAlterTestCase::testSimpleAlter in SimpleTest 7

Test that we can do basic alters.

File

tests/database_test.test, line 2141

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, t('Returned the correct number of rows.'));
}