class ImageCachePresetTest
Same name and namespace in other branches
- 11.x core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest
- 10 core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest
- 8.9.x core/modules/image/tests/src/Kernel/Plugin/migrate/source/d6/ImageCachePresetTest.php \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest
Tests the d6_imagecache_presets source plugin.
@covers \Drupal\image\Plugin\migrate\source\d6\ImageCachePreset
@group image
Hierarchy
- class \Drupal\KernelTests\KernelTestBase extends \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase implements \Drupal\KernelTests\KernelTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase implements \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase
- class \Drupal\Tests\image\Kernel\Plugin\migrate\source\d6\ImageCachePresetTest implements \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase implements \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase
- class \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase implements \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of ImageCachePresetTest
File
-
core/
modules/ image/ tests/ src/ Kernel/ Plugin/ migrate/ source/ d6/ ImageCachePresetTest.php, line 16
Namespace
Drupal\Tests\image\Kernel\Plugin\migrate\source\d6View source
class ImageCachePresetTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'image',
'migrate_drupal',
];
/**
* {@inheritdoc}
*/
public 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.