You are here

public function FieldUpdatePathTestCase::testFilledUpgrade in Drupal 7

Tests that the update is successful.

File

modules/simpletest/tests/upgrade/update.field.test, line 36
Provides update path tests for the Field module.

Class

FieldUpdatePathTestCase
Tests the Field 7.0 -> 7.x update path.

Code

public function testFilledUpgrade() {
  $this
    ->assertTrue($this
    ->performUpgrade(), 'The update was completed successfully.');
  $expected_settings = array(
    'extra_fields' => array(
      'display' => array(
        'poll_view_voting' => array(
          'default' => array(
            'weight' => '0',
            'visible' => TRUE,
          ),
        ),
        'poll_view_results' => array(
          'default' => array(
            'weight' => '0',
            'visible' => FALSE,
          ),
        ),
      ),
      'form' => array(),
    ),
    'view_modes' => array(),
  );
  $actual_settings = field_bundle_settings('node', 'poll');
  $this
    ->assertEqual($expected_settings, $actual_settings, 'Settings stored in field_bundle_settings were updated to per-bundle settings.');
}