X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate_drupal%2Ftests%2Fsrc%2FKernel%2FMigrateCckFieldPluginManagerTest.php;fp=web%2Fcore%2Fmodules%2Fmigrate_drupal%2Ftests%2Fsrc%2FKernel%2FMigrateCckFieldPluginManagerTest.php;h=7eb68ba3389093911c288fc632882265d619a5b7;hp=9e30795be1ef40bddd4d211f4166c96dad9f76cc;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php b/web/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php index 9e30795be..7eb68ba33 100644 --- a/web/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php +++ b/web/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php @@ -22,28 +22,20 @@ class MigrateCckFieldPluginManagerTest extends MigrateDrupalTestBase { public function testPluginSelection() { $plugin_manager = \Drupal::service('plugin.manager.migrate.cckfield'); - $plugin_id = $plugin_manager->getPluginIdFromFieldType('filefield', ['core' => 6]); - $this->assertIdentical('Drupal\\file\\Plugin\\migrate\\cckfield\\d6\\FileField', get_class($plugin_manager->createInstance($plugin_id, ['core' => 6]))); + $this->assertSame('d6_file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 6])); try { // If this test passes, getPluginIdFromFieldType will raise a // PluginNotFoundException and we'll never reach fail(). - $plugin_manager->getPluginIdFromFieldType('filefield', ['core' => 7]); + $plugin_manager->getPluginIdFromFieldType('d6_file', ['core' => 7]); $this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.'); } catch (PluginNotFoundException $e) { - $this->assertIdentical($e->getMessage(), "Plugin ID 'filefield' was not found."); + $this->assertSame($e->getMessage(), "Plugin ID 'd6_file' was not found."); } - $this->assertIdentical('image', $plugin_manager->getPluginIdFromFieldType('image', ['core' => 7])); - $this->assertIdentical('file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 7])); - $this->assertIdentical('d6_file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 6])); - - $this->assertIdentical('text', $plugin_manager->getPluginIdFromFieldType('text', ['core' => 6])); - $this->assertIdentical('text', $plugin_manager->getPluginIdFromFieldType('text', ['core' => 7])); - // Test fallback when no core version is specified. - $this->assertIdentical('d6_no_core_version_specified', $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 6])); + $this->assertSame('d6_no_core_version_specified', $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 6])); try { // If this test passes, getPluginIdFromFieldType will raise a @@ -52,7 +44,7 @@ class MigrateCckFieldPluginManagerTest extends MigrateDrupalTestBase { $this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.'); } catch (PluginNotFoundException $e) { - $this->assertIdentical($e->getMessage(), "Plugin ID 'd6_no_core_version_specified' was not found."); + $this->assertSame($e->getMessage(), "Plugin ID 'd6_no_core_version_specified' was not found."); } }