You are here

protected function FieldTest::setUp in Zircon Profile 8.0

Same name in this branch
  1. 8.0 core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldTest::setUp()
  2. 8.0 core/modules/field/tests/src/Unit/Plugin/migrate/source/d6/FieldTest.php \Drupal\Tests\field\Unit\Plugin\migrate\source\d6\FieldTest::setUp()
  3. 8.0 core/modules/field/tests/src/Unit/Plugin/migrate/source/d7/FieldTest.php \Drupal\Tests\field\Unit\Plugin\migrate\source\d7\FieldTest::setUp()
Same name and namespace in other branches
  1. 8 core/modules/field/tests/src/Unit/Plugin/migrate/source/d6/FieldTest.php \Drupal\Tests\field\Unit\Plugin\migrate\source\d6\FieldTest::setUp()

Prepopulate contents with results.

Overrides MigrateSqlSourceTestCase::setUp

File

core/modules/field/tests/src/Unit/Plugin/migrate/source/d6/FieldTest.php, line 52
Contains \Drupal\Tests\field\Unit\Plugin\migrate\source\d6\FieldTest.

Class

FieldTest
Tests D6 field source plugin.

Namespace

Drupal\Tests\field\Unit\Plugin\migrate\source\d6

Code

protected function setUp() {
  $this->expectedResults[0]['global_settings'] = array(
    'text_processing' => 0,
    'max_length' => '',
    'allowed_values' => '',
    'allowed_values_php' => '',
  );
  $this->expectedResults[0]['db_columns'] = array(
    'value' => array(
      'type' => 'text',
      'size' => 'big',
      'not null' => '',
      'sortable' => 1,
      'views' => 1,
    ),
  );
  $this->databaseContents['content_node_field'] = $this->expectedResults;
  $this->databaseContents['content_node_field'][0]['global_settings'] = serialize($this->databaseContents['content_node_field'][0]['global_settings']);
  $this->databaseContents['content_node_field'][0]['db_columns'] = serialize($this->databaseContents['content_node_field'][0]['db_columns']);
  $this->databaseContents['content_node_field_instance'][0]['widget_type'] = 'text_textarea';
  $this->databaseContents['content_node_field_instance'][0]['field_name'] = 'field_body';
  parent::setUp();
}