X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fimage%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateImageTest.php;fp=web%2Fcore%2Fmodules%2Fimage%2Ftests%2Fsrc%2FKernel%2FMigrate%2Fd6%2FMigrateImageTest.php;h=7fc0b0bafb3423aaae9818a588ad7b388d398acc;hp=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php b/web/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php new file mode 100644 index 000000000..7fc0b0baf --- /dev/null +++ b/web/core/modules/image/tests/src/Kernel/Migrate/d6/MigrateImageTest.php @@ -0,0 +1,51 @@ +setUpMigratedFiles(); + $this->installSchema('file', ['file_usage']); + $this->executeMigrations([ + 'd6_node', + ]); + } + + /** + * Test image migration from Drupal 6 to 8. + */ + public function testNode() { + $node = Node::load(9); + // Test the image field sub fields. + $this->assertSame('2', $node->field_test_imagefield->target_id); + $this->assertSame('Test alt', $node->field_test_imagefield->alt); + $this->assertSame('Test title', $node->field_test_imagefield->title); + $this->assertSame('80', $node->field_test_imagefield->width); + $this->assertSame('60', $node->field_test_imagefield->height); + } + +}