diff --git a/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php b/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php index 24cf4fed1b..fadca086e1 100644 --- a/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php +++ b/core/modules/search/src/Plugin/migrate/destination/EntitySearchPage.php @@ -13,6 +13,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; /** + * Migrate destination for search page. + * * @MigrateDestination( * id = "entity:search_page" * ) @@ -35,9 +37,9 @@ class EntitySearchPage extends EntityConfigBase { * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. - * @param MigrationInterface $migration + * @param \DRupal\migrate\plugin\MigrationInterface $migration * The migration. - * @param EntityStorageInterface $storage + * @param \Drupal\Core\Entity\EntityStorageInterface $storage * The storage for this entity type. * @param array $bundles * The list of bundles this entity type has. @@ -45,7 +47,7 @@ class EntitySearchPage extends EntityConfigBase { * The language manager. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. - * @param ModuleHandlerInterface $module_handler + * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. */ public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EntityStorageInterface $storage, array $bundles, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler) { @@ -101,7 +103,7 @@ public function import(Row $row, array $old_destination_id_values = array()) { */ protected function updateEntity(EntityInterface $entity, Row $row) { $entity->setPlugin($row->getDestinationProperty('plugin')); - // The user_search plugin does not have a setConfiguraion() method. + // The user_search plugin does not have a setConfiguration() method. if (method_exists($entity->getPlugin(), 'setConfiguration')) { $entity->getPlugin()->setConfiguration($row->getDestinationProperty('configuration')); } diff --git a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php index 2096d91b8b..8c84d3cadd 100644 --- a/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php +++ b/core/modules/search/tests/src/Kernel/Migrate/d7/MigrateSearchPageTest.php @@ -21,21 +21,13 @@ class MigrateSearchPageTest extends MigrateDrupal7TestBase { public static $modules = ['search']; /** - * {@inheritdoc} - */ - protected function setUp() { - parent::setUp(); - $this->executeMigration('search_page'); - } - - /** * Asserts various aspects of an SearchPage entity. * * @param string $id * The expected search page ID. * @param string $path * The expected path of the search page. - * @param boolean $status + * @param bool $status * The expected status of the search page. * @param array $expected_config * An array of expected configuration for the search page. @@ -51,9 +43,9 @@ protected function assertEntity($id, $path, $status = FALSE, array $expected_con $this->assertSame($expected_config, $configuration); } } + /** - * Tests Drupal 7 search status and settings to Drupal 8 search page entity - * migration. + * Tests migration of search status and settings to search page entity. */ public function testSearchPage() { $this->enableModules(['node']); @@ -66,7 +58,7 @@ public function testSearchPage() { 'relevance' => 2, 'sticky' => 0, 'views' => 0, - ] + ], ]; $this->assertEntity('node_search', 'node', TRUE, $configuration); $this->assertEntity('user_search', 'user'); @@ -88,8 +80,7 @@ public function testSearchPage() { } /** - * Tests that search page is only migrated for modules enabled on - * destination site. + * Tests that search page is only migrated for modules enabled on D8 site. */ public function testModuleExists() { $this->installConfig(['search']); @@ -112,4 +103,5 @@ public function testUserSearchCreate() { $this->assertEntity('user_search', 'user'); } + }