comparison core/modules/migrate/tests/src/Kernel/MigrateBundleTest.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
64 $term_migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition); 64 $term_migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition);
65 65
66 // Import and validate the term entity was created with the correct bundle. 66 // Import and validate the term entity was created with the correct bundle.
67 $term_executable = new MigrateExecutable($term_migration, $this); 67 $term_executable = new MigrateExecutable($term_migration, $this);
68 $term_executable->import(); 68 $term_executable->import();
69 /** @var Term $term */ 69 /** @var \Drupal\taxonomy\Entity\Term $term */
70 $term = Term::load(1); 70 $term = Term::load(1);
71 $this->assertEquals($term->bundle(), 'categories'); 71 $this->assertEquals($term->bundle(), 'categories');
72 } 72 }
73 73
74 /** 74 /**
102 $term_migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition); 102 $term_migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition);
103 103
104 // Import and validate the term entities were created with the correct bundle. 104 // Import and validate the term entities were created with the correct bundle.
105 $term_executable = new MigrateExecutable($term_migration, $this); 105 $term_executable = new MigrateExecutable($term_migration, $this);
106 $term_executable->import(); 106 $term_executable->import();
107 /** @var Term $term */ 107 /** @var \Drupal\taxonomy\Entity\Term $term */
108 $term = Term::load(1); 108 $term = Term::load(1);
109 $this->assertEquals($term->bundle(), 'categories'); 109 $this->assertEquals($term->bundle(), 'categories');
110 $term = Term::load(2); 110 $term = Term::load(2);
111 $this->assertEquals($term->bundle(), 'tags'); 111 $this->assertEquals($term->bundle(), 'tags');
112 } 112 }
144 $term_migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition); 144 $term_migration = \Drupal::service('plugin.manager.migration')->createStubMigration($definition);
145 145
146 // Import and validate the term entities were created with the correct bundle. 146 // Import and validate the term entities were created with the correct bundle.
147 $term_executable = new MigrateExecutable($term_migration, $this); 147 $term_executable = new MigrateExecutable($term_migration, $this);
148 $term_executable->import(); 148 $term_executable->import();
149 /** @var Term $term */ 149 /** @var \Drupal\taxonomy\Entity\Term $term */
150 $term = Term::load(1); 150 $term = Term::load(1);
151 $this->assertEquals($term->bundle(), 'categories'); 151 $this->assertEquals($term->bundle(), 'categories');
152 $term = Term::load(2); 152 $term = Term::load(2);
153 $this->assertEquals($term->bundle(), 'tags'); 153 $this->assertEquals($term->bundle(), 'tags');
154 } 154 }