function ImageCachePresetTest::providerSource

Same name in other branches
  1. 9 core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest::providerSource()
  2. 8.9.x core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest::providerSource()
  3. 10 core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest::providerSource()

File

core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php, line 28

Class

ImageCachePresetTest
Tests the d6_imagecache_presets source plugin.

Namespace

Drupal\Tests\image\Kernel\Plugin\migrate\source\d6

Code

public static function providerSource() {
    $tests = [];
    // The source data.
    $tests[0]['source_data']['imagecache_preset'] = [
        [
            'presetid' => '1',
            'presetname' => 'slack_jaw_boys',
        ],
    ];
    $tests[0]['source_data']['imagecache_action'] = [
        [
            'actionid' => '3',
            'presetid' => '1',
            'weight' => '0',
            'module' => 'imagecache',
            'action' => 'imagecache_scale_and_crop',
            'data' => 'a:2:{s:5:"width";s:4:"100%";s:6:"height";s:4:"100%";}',
        ],
    ];
    // The expected results.
    $tests[0]['expected_data'] = [
        [
            'presetid' => '1',
            'presetname' => 'slack_jaw_boys',
            'actions' => [
                [
                    'actionid' => '3',
                    'presetid' => '1',
                    'weight' => '0',
                    'module' => 'imagecache',
                    'action' => 'imagecache_scale_and_crop',
                    'data' => [
                        'width' => '100%',
                        'height' => '100%',
                    ],
                ],
            ],
        ],
    ];
    return $tests;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.