You are here

public function MigrateImageStylesTest::setUp in Zircon Profile 8

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

Overrides MigrateSqlSourceTestCase::setUp

File

core/modules/image/tests/src/Unit/Plugin/migrate/source/d7/MigrateImageStylesTest.php, line 48
Contains \Drupal\Tests\image\Unit\Plugin\migrate\source\d7\MigrateImageStylesTest.

Class

MigrateImageStylesTest
Tests D7 ImageStyles source plugin.

Namespace

Drupal\Tests\image\Unit\Plugin\migrate\source\d7

Code

public function setUp() {
  foreach ($this->expectedResults as $k => $row) {
    foreach (array(
      'isid',
      'name',
      'label',
    ) as $field) {
      $this->databaseContents['image_styles'][$k][$field] = $row[$field];
    }
    foreach ($row['effects'] as $id => $effect) {
      $row['effects'][$id]['data'] = serialize($row['effects'][$id]['data']);
    }
    $this->databaseContents['image_effects'] = $row['effects'];
  }
  parent::setUp();
}