diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php index 214b0e805ba1482030abc4e07df3ba3444a79cde..85ec14aa869bd1758ff5d28d2073abc4123257e9 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorFeedTest.php @@ -41,16 +41,16 @@ public function testAggregatorFeedImport() { /** @var Feed $feed */ $feed = Feed::load(5); $this->assertNotNull($feed->uuid()); - $this->assertEqual($feed->title->value, 'Know Your Meme'); - $this->assertEqual($feed->language()->getId(), 'en'); - $this->assertEqual($feed->url->value, 'http://knowyourmeme.com/newsfeed.rss'); - $this->assertEqual($feed->refresh->value, 900); - $this->assertEqual($feed->checked->value, 1387659487); - $this->assertEqual($feed->queued->value, 0); - $this->assertEqual($feed->link->value, 'http://knowyourmeme.com'); - $this->assertEqual($feed->description->value, 'New items added to the News Feed'); - $this->assertEqual($feed->image->value, 'http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png'); - $this->assertEqual($feed->etag->value, '"213cc1365b96c310e92053c5551f0504"'); - $this->assertEqual($feed->modified->value, 0); + $this->assertIdentical($feed->title->value, 'Know Your Meme'); + $this->assertIdentical($feed->language()->getId(), 'en'); + $this->assertIdentical($feed->url->value, 'http://knowyourmeme.com/newsfeed.rss'); + $this->assertIdentical($feed->refresh->value, '900'); + $this->assertIdentical($feed->checked->value, '1387659487'); + $this->assertIdentical($feed->queued->value, '0'); + $this->assertIdentical($feed->link->value, 'http://knowyourmeme.com'); + $this->assertIdentical($feed->description->value, 'New items added to the News Feed'); + $this->assertIdentical($feed->image->value, 'http://b.thumbs.redditmedia.com/harEHsUUZVajabtC.png'); + $this->assertIdentical($feed->etag->value, '"213cc1365b96c310e92053c5551f0504"'); + $this->assertIdentical($feed->modified->value, '0'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php index 672711cc7fee3936de2d5dcd5cd75005d78c392d..0a8b14f37be689d55454e52633d39b6f421b13b8 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateAggregatorItemTest.php @@ -60,15 +60,15 @@ protected function setUp() { public function testAggregatorItem() { /** @var Item $item */ $item = Item::load(1); - $this->assertEqual($item->id(), 1); - $this->assertEqual($item->getFeedId(), 5); - $this->assertEqual($item->label(), 'This (three) weeks in Drupal Core - January 10th 2014'); - $this->assertEqual($item->getAuthor(), 'larowlan'); - $this->assertEqual($item->getDescription(), "<h2 id='new'>What's new with Drupal 8?</h2>"); - $this->assertEqual($item->getLink(), 'https://groups.drupal.org/node/395218'); - $this->assertEqual($item->getPostedTime(), 1389297196); - $this->assertEqual($item->language()->getId(), 'en'); - $this->assertEqual($item->getGuid(), '395218 at https://groups.drupal.org'); + $this->assertIdentical($item->id(), '1'); + $this->assertIdentical($item->getFeedId(), '5'); + $this->assertIdentical($item->label(), 'This (three) weeks in Drupal Core - January 10th 2014'); + $this->assertIdentical($item->getAuthor(), 'larowlan'); + $this->assertIdentical($item->getDescription(), "<h2 id='new'>What's new with Drupal 8?</h2>"); + $this->assertIdentical($item->getLink(), 'https://groups.drupal.org/node/395218'); + $this->assertIdentical($item->getPostedTime(), '1389297196'); + $this->assertIdentical($item->language()->getId(), 'en'); + $this->assertIdentical($item->getGuid(), '395218 at https://groups.drupal.org'); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php index f44346e43330aed52ad10938f52309c2e222b357..bb7ef961f5c73ce8d71df75d2092d655e3db5aba 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockContentTest.php @@ -56,20 +56,20 @@ protected function setUp() { public function testBlockMigration() { /** @var BlockContent $block */ $block = entity_load('block_content', 1); - $this->assertEqual('My block 1', $block->label()); - $this->assertEqual(1, $block->getRevisionId()); + $this->assertIdentical('My block 1', $block->label()); + $this->assertIdentical('1', $block->getRevisionId()); $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time()); - $this->assertEqual('en', $block->language()->getId()); - $this->assertEqual('<h3>My first custom block body</h3>', $block->body->value); - $this->assertEqual('full_html', $block->body->format); + $this->assertIdentical('en', $block->language()->getId()); + $this->assertIdentical('<h3>My first custom block body</h3>', $block->body->value); + $this->assertIdentical('full_html', $block->body->format); $block = entity_load('block_content', 2); - $this->assertEqual('My block 2', $block->label()); - $this->assertEqual(2, $block->getRevisionId()); + $this->assertIdentical('My block 2', $block->label()); + $this->assertIdentical('2', $block->getRevisionId()); $this->assertTrue(REQUEST_TIME <= $block->getChangedTime() && $block->getChangedTime() <= time()); - $this->assertEqual('en', $block->language()->getId()); - $this->assertEqual('<h3>My second custom block body</h3>', $block->body->value); - $this->assertEqual('full_html', $block->body->format); + $this->assertIdentical('en', $block->language()->getId()); + $this->assertIdentical('<h3>My second custom block body</h3>', $block->body->value); + $this->assertIdentical('full_html', $block->body->format); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockTest.php index 84c1898eea6bcd710c235ed53aaaffb2507d8313..ecf393a781dc80affb3c86873a7a49177ef6d480 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateBlockTest.php @@ -87,98 +87,98 @@ protected function setUp() { */ public function testBlockMigration() { $blocks = Block::loadMultiple(); - $this->assertEqual(count($blocks), 10); + $this->assertIdentical(count($blocks), 10); // User blocks $test_block_user = $blocks['user']; $this->assertNotNull($test_block_user); - $this->assertEqual('sidebar_first', $test_block_user->getRegion()); - $this->assertEqual('bartik', $test_block_user->getTheme()); + $this->assertIdentical('sidebar_first', $test_block_user->getRegion()); + $this->assertIdentical('bartik', $test_block_user->getTheme()); $visibility = $test_block_user->getVisibility(); $this->assertTrue(empty($visibility['request_path']['pages'])); - $this->assertEqual(0, $test_block_user->getWeight()); + $this->assertIdentical(0, $test_block_user->getWeight()); $test_block_user_1 = $blocks['user_1']; $this->assertNotNull($test_block_user_1); - $this->assertEqual('sidebar_first', $test_block_user_1->getRegion()); - $this->assertEqual('bartik', $test_block_user_1->getTheme()); + $this->assertIdentical('sidebar_first', $test_block_user_1->getRegion()); + $this->assertIdentical('bartik', $test_block_user_1->getTheme()); $visibility = $test_block_user_1->getVisibility(); $this->assertTrue(empty($visibility['request_path']['pages'])); - $this->assertEqual(0, $test_block_user_1->getWeight()); + $this->assertIdentical(0, $test_block_user_1->getWeight()); $test_block_user_2 = $blocks['user_2']; $this->assertNotNull($test_block_user_2); - $this->assertEqual('sidebar_second', $test_block_user_2->getRegion()); - $this->assertEqual('bartik', $test_block_user_2->getTheme()); + $this->assertIdentical('sidebar_second', $test_block_user_2->getRegion()); + $this->assertIdentical('bartik', $test_block_user_2->getTheme()); $visibility = $test_block_user_2->getVisibility(); - $this->assertEqual($visibility['user_role']['id'], 'user_role'); + $this->assertIdentical($visibility['user_role']['id'], 'user_role'); $roles = array(); $roles['authenticated'] = 'authenticated'; - $this->assertEqual($visibility['user_role']['roles'], $roles); + $this->assertIdentical($visibility['user_role']['roles'], $roles); $this->assertFalse($visibility['user_role']['negate']); - $this->assertEqual(-9, $test_block_user_2->getWeight()); + $this->assertIdentical(-9, $test_block_user_2->getWeight()); $test_block_user_3 = $blocks['user_3']; $this->assertNotNull($test_block_user_3); - $this->assertEqual('sidebar_second', $test_block_user_3->getRegion()); - $this->assertEqual('bartik', $test_block_user_3->getTheme()); + $this->assertIdentical('sidebar_second', $test_block_user_3->getRegion()); + $this->assertIdentical('bartik', $test_block_user_3->getTheme()); $visibility = $test_block_user_3->getVisibility(); - $this->assertEqual($visibility['user_role']['id'], 'user_role'); + $this->assertIdentical($visibility['user_role']['id'], 'user_role'); $roles = array(); $roles['migrate_test_role_1'] = 'migrate_test_role_1'; - $this->assertEqual($visibility['user_role']['roles'], $roles); + $this->assertIdentical($visibility['user_role']['roles'], $roles); $this->assertFalse($visibility['user_role']['negate']); - $this->assertEqual(-6, $test_block_user_3->getWeight()); + $this->assertIdentical(-6, $test_block_user_3->getWeight()); // Check system block $test_block_system = $blocks['system']; $this->assertNotNull($test_block_system); - $this->assertEqual('footer', $test_block_system->getRegion()); - $this->assertEqual('bartik', $test_block_system->getTheme()); + $this->assertIdentical('footer', $test_block_system->getRegion()); + $this->assertIdentical('bartik', $test_block_system->getTheme()); $visibility = $test_block_system->getVisibility(); $this->assertTrue(empty($visibility['request_path']['pages'])); - $this->assertEqual(-5, $test_block_system->getWeight()); + $this->assertIdentical(-5, $test_block_system->getWeight()); // Check menu blocks $test_block_menu = $blocks['menu']; $this->assertNotNull($test_block_menu); - $this->assertEqual('header', $test_block_menu->getRegion()); - $this->assertEqual('bartik', $test_block_menu->getTheme()); + $this->assertIdentical('header', $test_block_menu->getRegion()); + $this->assertIdentical('bartik', $test_block_menu->getTheme()); $visibility = $test_block_menu->getVisibility(); $this->assertTrue(empty($visibility['request_path']['pages'])); - $this->assertEqual(-5, $test_block_menu->getWeight()); + $this->assertIdentical(-5, $test_block_menu->getWeight()); // Check custom blocks $test_block_block = $blocks['block']; $this->assertNotNull($test_block_block); - $this->assertEqual('content', $test_block_block->getRegion()); - $this->assertEqual('bartik', $test_block_block->getTheme()); + $this->assertIdentical('content', $test_block_block->getRegion()); + $this->assertIdentical('bartik', $test_block_block->getTheme()); $visibility = $test_block_block->getVisibility(); - $this->assertEqual($visibility['request_path']['pages'], '<front>'); - $this->assertEqual(0, $test_block_block->getWeight()); + $this->assertIdentical($visibility['request_path']['pages'], '<front>'); + $this->assertIdentical(0, $test_block_block->getWeight()); $test_block_block_1 = $blocks['block_1']; $this->assertNotNull($test_block_block_1); - $this->assertEqual('right', $test_block_block_1->getRegion()); - $this->assertEqual('bluemarine', $test_block_block_1->getTheme()); + $this->assertIdentical('right', $test_block_block_1->getRegion()); + $this->assertIdentical('bluemarine', $test_block_block_1->getTheme()); $visibility = $test_block_block_1->getVisibility(); - $this->assertEqual($visibility['request_path']['pages'], 'node'); - $this->assertEqual(-4, $test_block_block_1->getWeight()); + $this->assertIdentical($visibility['request_path']['pages'], 'node'); + $this->assertIdentical(-4, $test_block_block_1->getWeight()); $test_block_block_2 = $blocks['block_2']; $this->assertNotNull($test_block_block_2); - $this->assertEqual('right', $test_block_block_2->getRegion()); - $this->assertEqual('test_theme', $test_block_block_2->getTheme()); + $this->assertIdentical('right', $test_block_block_2->getRegion()); + $this->assertIdentical('test_theme', $test_block_block_2->getTheme()); $visibility = $test_block_block_2->getVisibility(); $this->assertTrue(empty($visibility['request_path']['pages'])); - $this->assertEqual(-7, $test_block_block_2->getWeight()); + $this->assertIdentical(-7, $test_block_block_2->getWeight()); $test_block_block_3 = $blocks['block_3']; $this->assertNotNull($test_block_block_3); - $this->assertEqual('left', $test_block_block_3->getRegion()); - $this->assertEqual('test_theme', $test_block_block_3->getTheme()); + $this->assertIdentical('left', $test_block_block_3->getRegion()); + $this->assertIdentical('test_theme', $test_block_block_3->getTheme()); $visibility = $test_block_block_3->getVisibility(); $this->assertTrue(empty($visibility['request_path']['pages'])); - $this->assertEqual(-2, $test_block_block_3->getWeight()); + $this->assertIdentical(-2, $test_block_block_3->getWeight()); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateBookTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateBookTest.php index fe55e1468a341ae12f31be74d968099e17903732..23e9173296ccf3aa58781ba892fb8a0a2189a56c 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateBookTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateBookTest.php @@ -55,26 +55,26 @@ protected function setUp() { */ public function testBook() { $nodes = Node::loadMultiple(array(4, 5, 6, 7, 8)); - $this->assertEqual($nodes[4]->book['bid'], 4); - $this->assertEqual($nodes[4]->book['pid'], 0); + $this->assertIdentical($nodes[4]->book['bid'], '4'); + $this->assertIdentical($nodes[4]->book['pid'], '0'); - $this->assertEqual($nodes[5]->book['bid'], 4); - $this->assertEqual($nodes[5]->book['pid'], 4); + $this->assertIdentical($nodes[5]->book['bid'], '4'); + $this->assertIdentical($nodes[5]->book['pid'], '4'); - $this->assertEqual($nodes[6]->book['bid'], 4); - $this->assertEqual($nodes[6]->book['pid'], 5); + $this->assertIdentical($nodes[6]->book['bid'], '4'); + $this->assertIdentical($nodes[6]->book['pid'], '5'); - $this->assertEqual($nodes[7]->book['bid'], 4); - $this->assertEqual($nodes[7]->book['pid'], 5); + $this->assertIdentical($nodes[7]->book['bid'], '4'); + $this->assertIdentical($nodes[7]->book['pid'], '5'); - $this->assertEqual($nodes[8]->book['bid'], 8); - $this->assertEqual($nodes[8]->book['pid'], 0); + $this->assertIdentical($nodes[8]->book['bid'], '8'); + $this->assertIdentical($nodes[8]->book['pid'], '0'); $tree = \Drupal::service('book.manager')->bookTreeAllData(4); - $this->assertEqual($tree['49990 Node 4 4']['link']['nid'], 4); - $this->assertEqual($tree['49990 Node 4 4']['below']['50000 Node 5 5']['link']['nid'], 5); - $this->assertEqual($tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['link']['nid'], 6); - $this->assertEqual($tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['link']['nid'], 7); + $this->assertIdentical($tree['49990 Node 4 4']['link']['nid'], '4'); + $this->assertIdentical($tree['49990 Node 4 4']['below']['50000 Node 5 5']['link']['nid'], '5'); + $this->assertIdentical($tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['link']['nid'], '6'); + $this->assertIdentical($tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['link']['nid'], '7'); $this->assertIdentical($tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 6 6']['below'], array()); $this->assertIdentical($tree['49990 Node 4 4']['below']['50000 Node 5 5']['below']['50000 Node 7 7']['below'], array()); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldRevisionTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldRevisionTest.php index 64b286cda1af36725d2d5ad0594986ee6c3feb2d..35a73c5ae81784944b3352aa52b74c5314875b86 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldRevisionTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldRevisionTest.php @@ -76,8 +76,8 @@ protected function setUp() { */ public function testCckFieldRevision() { $node = \Drupal::entityManager()->getStorage('node')->loadRevision(2); - $this->assertEqual($node->id(), 1, 'Node 1 loaded.'); - $this->assertEqual($node->getRevisionId(), 2, 'Node 1 revision 2loaded.'); + $this->assertIdentical($node->id(), '1', 'Node 1 loaded.'); + $this->assertIdentical($node->getRevisionId(), '2', 'Node 1 revision 2loaded.'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php index a6485e484bc7b5f44971fe68c503a136ebc9395d..a4e906a54dc8ea98054c3e00050044fc3cde7d92 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCckFieldValuesTest.php @@ -84,7 +84,9 @@ protected function setUp() { entity_create('field_storage_config', array( 'entity_type' => 'node', 'field_name' => 'field_multivalue', - 'type' => 'integer', + 'type' => 'decimal', + 'precision' => '10', + 'scale' => '2', 'cardinality' => -1, ))->save(); entity_create('field_config', array( @@ -167,16 +169,16 @@ protected function setUp() { public function testCckFields() { $node = Node::load(1); - $this->assertEqual($node->field_test->value, 'This is a shared text field'); - $this->assertEqual($node->field_test->format, 'filtered_html'); - $this->assertEqual($node->field_test_two->value, 10); - $this->assertEqual($node->field_test_two[1]->value, 20); + $this->assertIdentical($node->field_test->value, 'This is a shared text field'); + $this->assertIdentical($node->field_test->format, 'filtered_html'); + $this->assertIdentical($node->field_test_two->value, '10'); + $this->assertIdentical($node->field_test_two[1]->value, '20'); - $this->assertEqual($node->field_test_three->value, '42.42', 'Single field second value is correct.'); - $this->assertEqual($node->field_test_integer_selectlist[0]->value, '3412'); - $this->assertEqual($node->field_test_identical1->value, '1', 'Integer value is correct'); - $this->assertEqual($node->field_test_identical2->value, '1', 'Integer value is correct'); - $this->assertEqual($node->field_test_exclude_unset->value, 'This is a field with exclude unset.', 'Field with exclude unset is correct.'); + $this->assertIdentical($node->field_test_three->value, '42.42', 'Single field second value is correct.'); + $this->assertIdentical($node->field_test_integer_selectlist[0]->value, '3412'); + $this->assertIdentical($node->field_test_identical1->value, '1', 'Integer value is correct'); + $this->assertIdentical($node->field_test_identical2->value, '1', 'Integer value is correct'); + $this->assertIdentical($node->field_test_exclude_unset->value, 'This is a field with exclude unset.', 'Field with exclude unset is correct.'); // Test that link fields are migrated. $this->assertIdentical($node->field_test_link->uri, 'http://drupal.org/project/drupal'); @@ -188,8 +190,8 @@ public function testCckFields() { $this->assertIdentical($node->field_test_filefield->target_id, '5'); $planet_node = Node::load(3); - $this->assertEqual($planet_node->field_multivalue->value, 33); - $this->assertEqual($planet_node->field_multivalue[1]->value, 44); + $this->assertIdentical($planet_node->field_multivalue->value, '33.00'); + $this->assertIdentical($planet_node->field_multivalue[1]->value, '44.00'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php index c1e9273c57399e0442f59b4573684e8cb3807196..e44f31a1ddeff497b519f7188cf7c70733204838 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTest.php @@ -75,21 +75,21 @@ protected function setUp() { public function testComments() { /** @var \Drupal\comment\CommentInterface $comment */ $comment = entity_load('comment', 1); - $this->assertEqual('The first comment.', $comment->getSubject()); - $this->assertEqual('The first comment body.', $comment->comment_body->value); - $this->assertEqual('filtered_html', $comment->comment_body->format); - $this->assertEqual(0, $comment->pid->target_id); - $this->assertEqual(1, $comment->getCommentedEntityId()); - $this->assertEqual('node', $comment->getCommentedEntityTypeId()); - $this->assertEqual('en', $comment->language()->getId()); - $this->assertEqual('comment_no_subject', $comment->getTypeId()); + $this->assertIdentical('The first comment.', $comment->getSubject()); + $this->assertIdentical('The first comment body.', $comment->comment_body->value); + $this->assertIdentical('filtered_html', $comment->comment_body->format); + $this->assertIdentical('0', $comment->pid->target_id); + $this->assertIdentical('1', $comment->getCommentedEntityId()); + $this->assertIdentical('node', $comment->getCommentedEntityTypeId()); + $this->assertIdentical('en', $comment->language()->getId()); + $this->assertIdentical('comment_no_subject', $comment->getTypeId()); $comment = entity_load('comment', 2); - $this->assertEqual('The response to the second comment.', $comment->subject->value); - $this->assertEqual(3, $comment->pid->target_id); + $this->assertIdentical('The response to the second comment.', $comment->subject->value); + $this->assertIdentical('3', $comment->pid->target_id); $comment = entity_load('comment', 3); - $this->assertEqual('The second comment.', $comment->subject->value); - $this->assertEqual(0, $comment->pid->target_id); + $this->assertIdentical('The second comment.', $comment->subject->value); + $this->assertIdentical('0', $comment->pid->target_id); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php index 45da40bacbd19baccbae6728ad3be0e4795a54b7..a056db4c39d59f68654b3bd8a2cb18d0469ded73 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php @@ -42,9 +42,9 @@ protected function setUp() { */ public function testCommentType() { $comment_type = entity_load('comment_type', 'comment'); - $this->assertEqual('node', $comment_type->getTargetEntityTypeId()); + $this->assertIdentical('node', $comment_type->getTargetEntityTypeId()); $comment_type = entity_load('comment_type', 'comment_no_subject'); - $this->assertEqual('node', $comment_type->getTargetEntityTypeId()); + $this->assertIdentical('node', $comment_type->getTargetEntityTypeId()); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityDisplayTest.php index d7f7a5f386fc5a7f9921d72edc86bde15c60d4ea..0a6a4a8119085acf215e33374ed66b0b11a8dc75 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityDisplayTest.php @@ -30,9 +30,9 @@ class MigrateCommentVariableEntityDisplayTest extends MigrateCommentVariableDisp public function testCommentEntityDisplay() { foreach ($this->types as $type) { $component = entity_get_display('node', $type, 'default')->getComponent('comment'); - $this->assertEqual($component['label'], 'hidden'); - $this->assertEqual($component['type'], 'comment_default'); - $this->assertEqual($component['weight'], 20); + $this->assertIdentical($component['label'], 'hidden'); + $this->assertIdentical($component['type'], 'comment_default'); + $this->assertIdentical($component['weight'], 20); } } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php index 8d6f9702f4f8e1c1b3114f816ab555a76a9939fa..30bd4cb37bba52fb1302090ad48cd8cc1a89ccd5 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplaySubjectTest.php @@ -60,8 +60,8 @@ protected function setUp() { public function testCommentEntityFormDisplay() { $component = entity_get_form_display('comment', 'comment', 'default') ->getComponent('subject'); - $this->assertEqual($component['type'], 'string_textfield'); - $this->assertEqual($component['weight'], 10); + $this->assertIdentical($component['type'], 'string_textfield'); + $this->assertIdentical($component['weight'], 10); $component = entity_get_form_display('comment', 'comment_no_subject', 'default') ->getComponent('subject'); $this->assertNull($component); diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplayTest.php index f0b3dc54400835d2f02c6fbdb84d411215adb9cc..427b37587a6d8a3d271c9beb5088dfae2a9835f4 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableEntityFormDisplayTest.php @@ -25,8 +25,8 @@ class MigrateCommentVariableEntityFormDisplayTest extends MigrateCommentVariable public function testCommentEntityFormDisplay() { foreach ($this->types as $type) { $component = entity_get_form_display('node', $type, 'default')->getComponent('comment'); - $this->assertEqual($component['type'], 'comment_default'); - $this->assertEqual($component['weight'], 20); + $this->assertIdentical($component['type'], 'comment_default'); + $this->assertIdentical($component['weight'], 20); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableInstanceTest.php index 9ca6577ce5869d3a331a3d1f71331ee9a3be3a6a..5b5b31d84b4f43f054e5bb4eb95a4d1cb4caf1b1 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentVariableInstanceTest.php @@ -66,24 +66,24 @@ protected function setUp() { */ public function testCommentFieldInstance() { $node = entity_create('node', array('type' => 'page')); - $this->assertEqual($node->comment->status, 0); - $this->assertEqual($node->comment->getFieldDefinition()->getName(), 'comment'); + $this->assertIdentical($node->comment->status, 0); + $this->assertIdentical($node->comment->getFieldDefinition()->getName(), 'comment'); $settings = $node->comment->getFieldDefinition()->getSettings(); - $this->assertEqual($settings['default_mode'], 4); - $this->assertEqual($settings['per_page'], 50); - $this->assertEqual($settings['anonymous'], 0); - $this->assertEqual($settings['form_location'], 0); - $this->assertEqual($settings['preview'], 1); + $this->assertIdentical($settings['default_mode'], 4); + $this->assertIdentical($settings['per_page'], 50); + $this->assertIdentical($settings['anonymous'], 0); + $this->assertIdentical($settings['form_location'], FALSE); + $this->assertIdentical($settings['preview'], 1); $node = entity_create('node', array('type' => 'story')); - $this->assertEqual($node->comment_no_subject->status, 2); - $this->assertEqual($node->comment_no_subject->getFieldDefinition()->getName(), 'comment_no_subject'); + $this->assertIdentical($node->comment_no_subject->status, 2); + $this->assertIdentical($node->comment_no_subject->getFieldDefinition()->getName(), 'comment_no_subject'); $settings = $node->comment_no_subject->getFieldDefinition()->getSettings(); - $this->assertEqual($settings['default_mode'], 2); - $this->assertEqual($settings['per_page'], 70); - $this->assertEqual($settings['anonymous'], 1); - $this->assertEqual($settings['form_location'], 0); - $this->assertEqual($settings['preview'], 0); + $this->assertIdentical($settings['default_mode'], 2); + $this->assertIdentical($settings['per_page'], 70); + $this->assertIdentical($settings['anonymous'], 1); + $this->assertIdentical($settings['form_location'], FALSE); + $this->assertIdentical($settings['preview'], 0); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateContactCategoryTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateContactCategoryTest.php index 3d690d97c39e104dc88887365396874bc3a9954f..2655306044530744eca2f6b8dfd856cfdb4c762c 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateContactCategoryTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateContactCategoryTest.php @@ -46,22 +46,22 @@ protected function setUp() { public function testContactCategory() { /** @var \Drupal\contact\Entity\ContactForm $contact_form */ $contact_form = ContactForm::load('website_feedback'); - $this->assertEqual($contact_form->label(), 'Website feedback'); - $this->assertEqual($contact_form->getRecipients(), array('admin@example.com')); - $this->assertEqual($contact_form->getReply(), ''); - $this->assertEqual($contact_form->getWeight(), 0); + $this->assertIdentical($contact_form->label(), 'Website feedback'); + $this->assertIdentical($contact_form->getRecipients(), array('admin@example.com')); + $this->assertIdentical($contact_form->getReply(), ''); + $this->assertIdentical($contact_form->getWeight(), 0); $contact_form = ContactForm::load('some_other_category'); - $this->assertEqual($contact_form->label(), 'Some other category'); - $this->assertEqual($contact_form->getRecipients(), array('test@example.com')); - $this->assertEqual($contact_form->getReply(), 'Thanks for contacting us, we will reply ASAP!'); - $this->assertEqual($contact_form->getWeight(), 1); + $this->assertIdentical($contact_form->label(), 'Some other category'); + $this->assertIdentical($contact_form->getRecipients(), array('test@example.com')); + $this->assertIdentical($contact_form->getReply(), 'Thanks for contacting us, we will reply ASAP!'); + $this->assertIdentical($contact_form->getWeight(), 1); $contact_form = ContactForm::load('a_category_much_longer_than_thir'); - $this->assertEqual($contact_form->label(), 'A category much longer than thirty two characters'); - $this->assertEqual($contact_form->getRecipients(), array('fortyninechars@example.com')); - $this->assertEqual($contact_form->getReply(), ''); - $this->assertEqual($contact_form->getWeight(), 2); + $this->assertIdentical($contact_form->label(), 'A category much longer than thirty two characters'); + $this->assertIdentical($contact_form->getRecipients(), array('fortyninechars@example.com')); + $this->assertIdentical($contact_form->getReply(), ''); + $this->assertIdentical($contact_form->getWeight(), 2); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateDateFormatTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateDateFormatTest.php index b1c967e5a0eec323f7121c67ab71397c6189ef89..0bd3d1c2bc1280138bcca55917f99a092e4fcadc 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateDateFormatTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateDateFormatTest.php @@ -35,13 +35,13 @@ protected function setUp() { */ public function testDateFormats() { $short_date_format = entity_load('date_format', 'short'); - $this->assertEqual('\S\H\O\R\T m/d/Y - H:i', $short_date_format->getPattern()); + $this->assertIdentical('\S\H\O\R\T m/d/Y - H:i', $short_date_format->getPattern()); $medium_date_format = entity_load('date_format', 'medium'); - $this->assertEqual('\M\E\D\I\U\M D, m/d/Y - H:i', $medium_date_format->getPattern()); + $this->assertIdentical('\M\E\D\I\U\M D, m/d/Y - H:i', $medium_date_format->getPattern()); $long_date_format = entity_load('date_format', 'long'); - $this->assertEqual('\L\O\N\G l, F j, Y - H:i', $long_date_format->getPattern()); + $this->assertIdentical('\L\O\N\G l, F j, Y - H:i', $long_date_format->getPattern()); // Test that we can re-import using the EntityDateFormat destination. Database::getConnection('default', 'migrate') @@ -55,7 +55,7 @@ public function testDateFormats() { $executable->import(); $short_date_format = entity_load('date_format', 'short'); - $this->assertEqual('\S\H\O\R\T d/m/Y - H:i', $short_date_format->getPattern()); + $this->assertIdentical('\S\H\O\R\T d/m/Y - H:i', $short_date_format->getPattern()); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php index 99520a3bd7c46326008df9b6e22721b741c023ce..71f3e0f4fb73501f4142bd2e3222cea9f435ae97 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldFormatterSettingsTest.php @@ -84,8 +84,8 @@ public function testEntityDisplaySettings() { // Run tests. $field_name = "field_test"; $expected = array( - 'weight' => 1, 'label' => 'above', + 'weight' => 1, 'type' => 'text_trimmed', 'settings' => array('trim_length' => 600), 'third_party_settings' => array(), @@ -93,23 +93,23 @@ public function testEntityDisplaySettings() { // Can we load any entity display. $display = entity_load('entity_view_display', 'node.story.teaser'); - $this->assertEqual($display->getComponent($field_name), $expected); + $this->assertIdentical($display->getComponent($field_name), $expected); // Test migrate worked with multiple bundles. $display = entity_load('entity_view_display', 'node.test_page.teaser'); $expected['weight'] = 35; - $this->assertEqual($display->getComponent($field_name), $expected); + $this->assertIdentical($display->getComponent($field_name), $expected); // Test RSS because that has been converted from 4 to rss. $display = entity_load('entity_view_display', 'node.story.rss'); $expected['weight'] = 1; - $this->assertEqual($display->getComponent($field_name), $expected); + $this->assertIdentical($display->getComponent($field_name), $expected); // Test the default format with text_default which comes from a static map. $expected['type'] = 'text_default'; $expected['settings'] = array(); $display = entity_load('entity_view_display', 'node.story.default'); - $this->assertEqual($display->getComponent($field_name), $expected); + $this->assertIdentical($display->getComponent($field_name), $expected); // Check that we can migrate multiple fields. $content = $display->get('content'); @@ -127,107 +127,111 @@ public function testEntityDisplaySettings() { 'prefix_suffix' => TRUE, ); $component = $display->getComponent('field_test_two'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $expected['weight'] = 2; $expected['type'] = 'number_decimal'; - $expected['settings']['scale'] = 2; - $expected['settings']['decimal_separator'] = '.'; + $expected['settings'] = array( + 'scale' => 2, + 'decimal_separator' => '.', + 'thousand_separator' => ',', + 'prefix_suffix' => TRUE, + ); $component = $display->getComponent('field_test_three'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test the email field formatter settings are correct. $expected['weight'] = 6; $expected['type'] = 'email_mailto'; $expected['settings'] = array(); $component = $display->getComponent('field_test_email'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test the link field formatter settings. $expected['weight'] = 7; $expected['type'] = 'link'; $expected['settings'] = array( 'trim_length' => 80, - 'url_only' => 1, - 'url_plain' => 1, - 'rel' => 0, - 'target' => 0, + 'url_only' => TRUE, + 'url_plain' => TRUE, + 'rel' => '0', + 'target' => '0', ); $component = $display->getComponent('field_test_link'); - $this->assertEqual($component, $expected); - $expected['settings']['url_only'] = 0; - $expected['settings']['url_plain'] = 0; + $this->assertIdentical($component, $expected); + $expected['settings']['url_only'] = FALSE; + $expected['settings']['url_plain'] = FALSE; $display = entity_load('entity_view_display', 'node.story.teaser'); $component = $display->getComponent('field_test_link'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test the file field formatter settings. $expected['weight'] = 8; $expected['type'] = 'file_default'; $expected['settings'] = array(); $component = $display->getComponent('field_test_filefield'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $display = entity_load('entity_view_display', 'node.story.default'); $expected['type'] = 'file_url_plain'; $component = $display->getComponent('field_test_filefield'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test the image field formatter settings. $expected['weight'] = 9; $expected['type'] = 'image'; $expected['settings'] = array('image_style' => '', 'image_link' => ''); $component = $display->getComponent('field_test_imagefield'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $display = entity_load('entity_view_display', 'node.story.teaser'); $expected['settings']['image_link'] = 'file'; $component = $display->getComponent('field_test_imagefield'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test phone field. $expected['weight'] = 13; $expected['type'] = 'basic_string'; $expected['settings'] = array(); $component = $display->getComponent('field_test_phone'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test date field. $expected['weight'] = 10; $expected['type'] = 'datetime_default'; $expected['settings'] = array('format_type' => 'fallback'); $component = $display->getComponent('field_test_date'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $display = entity_load('entity_view_display', 'node.story.default'); $expected['settings']['format_type'] = 'long'; $component = $display->getComponent('field_test_date'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test date stamp field. $expected['weight'] = 11; $expected['settings']['format_type'] = 'fallback'; $component = $display->getComponent('field_test_datestamp'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $display = entity_load('entity_view_display', 'node.story.teaser'); $expected['settings'] = array('format_type' => 'medium'); $component = $display->getComponent('field_test_datestamp'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test datetime field. $expected['weight'] = 12; $expected['settings'] = array('format_type' => 'short'); $component = $display->getComponent('field_test_datetime'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $display = entity_load('entity_view_display', 'node.story.default'); $expected['settings']['format_type'] = 'fallback'; $component = $display->getComponent('field_test_datetime'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test a date field with a random format which should be mapped // to datetime_default. $display = entity_load('entity_view_display', 'node.story.rss'); $expected['settings']['format_type'] = 'fallback'; $component = $display->getComponent('field_test_datetime'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Test that our Id map has the correct data. - $this->assertEqual(array('node', 'story', 'teaser', 'field_test'), entity_load('migration', 'd6_field_formatter_settings')->getIdMap()->lookupDestinationID(array('story', 'teaser', 'node', 'field_test'))); + $this->assertIdentical(array('node', 'story', 'teaser', 'field_test'), entity_load('migration', 'd6_field_formatter_settings')->getIdMap()->lookupDestinationID(array('story', 'teaser', 'node', 'field_test'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldInstanceTest.php index dc4d2c8e47eef1969c072da15a1aaf8542d5da1a..cf757705e66dc51711ad0dea43ca2431e24387b7 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldInstanceTest.php @@ -89,42 +89,42 @@ public function testFieldInstanceSettings() { $entity = entity_create('node', array('type' => 'story')); // Test a text field. $field = FieldConfig::load('node.story.field_test'); - $this->assertEqual($field->label(), 'Text Field'); + $this->assertIdentical($field->label(), 'Text Field'); $expected = array('max_length' => 255); - $this->assertEqual($field->getSettings(), $expected); - $this->assertEqual('text for default value', $entity->field_test->value); + $this->assertIdentical($field->getSettings(), $expected); + $this->assertIdentical('text for default value', $entity->field_test->value); // Test a number field. $field = FieldConfig::load('node.story.field_test_two'); - $this->assertEqual($field->label(), 'Integer Field'); + $this->assertIdentical($field->label(), 'Integer Field'); $expected = array( - 'min' => '10', - 'max' => '100', + 'min' => 10, + 'max' => 100, 'prefix' => 'pref', 'suffix' => 'suf', - 'unsigned' => '', + 'unsigned' => FALSE, 'size' => 'normal', ); - $this->assertEqual($field->getSettings(), $expected); + $this->assertIdentical($field->getSettings(), $expected); $field = FieldConfig::load('node.story.field_test_four'); - $this->assertEqual($field->label(), 'Float Field'); + $this->assertIdentical($field->label(), 'Float Field'); $expected = array( - 'min' => 100, - 'max' => 200, + 'min' => 100.0, + 'max' => 200.0, 'prefix' => 'id-', 'suffix' => '', ); - $this->assertEqual($field->getSettings(), $expected); + $this->assertIdentical($field->getSettings(), $expected); // Test email field. $field = FieldConfig::load('node.story.field_test_email'); - $this->assertEqual($field->label(), 'Email Field'); - $this->assertEqual('benjy@example.com', $entity->field_test_email->value); + $this->assertIdentical($field->label(), 'Email Field'); + $this->assertIdentical('benjy@example.com', $entity->field_test_email->value); // Test a filefield. $field = FieldConfig::load('node.story.field_test_filefield'); - $this->assertEqual($field->label(), 'File Field'); + $this->assertIdentical($field->label(), 'File Field'); $expected = array( 'file_extensions' => 'txt pdf doc', 'file_directory' => 'images', @@ -143,11 +143,11 @@ public function testFieldInstanceSettings() { // Test a link field. $field = FieldConfig::load('node.story.field_test_link'); - $this->assertEqual($field->label(), 'Link Field'); + $this->assertIdentical($field->label(), 'Link Field'); $expected = array('title' => 2, 'link_type' => LinkItemInterface::LINK_GENERIC); - $this->assertEqual($field->getSettings(), $expected); - $this->assertEqual('default link title', $entity->field_test_link->title, 'Field field_test_link default title is correct.'); - $this->assertEqual('http://drupal.org', $entity->field_test_link->url, 'Field field_test_link default title is correct.'); + $this->assertIdentical($field->getSettings(), $expected); + $this->assertIdentical('default link title', $entity->field_test_link->title, 'Field field_test_link default title is correct.'); + $this->assertIdentical('http://drupal.org', $entity->field_test_link->url, 'Field field_test_link default title is correct.'); $this->assertIdentical($entity->field_test_link->options['attributes'], []); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldTest.php index d2ca2ad39bb8be3e05eda6f29f7f146dda4282c3..296ae36de99d0275290d4e7060417b896e62c0ec 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldTest.php @@ -52,68 +52,67 @@ public function testFields() { /** @var \Drupal\field\Entity\FieldStorageConfig $field_storage */ $field_storage = FieldStorageConfig::load('node.field_test'); $expected = array('max_length' => 255); - $this->assertEqual($field_storage->type, "text", t('Field type is @fieldtype. It should be text.', array('@fieldtype' => $field_storage->type))); - $this->assertEqual($field_storage->settings, $expected, "Field type text settings are correct"); + $this->assertIdentical($field_storage->type, "text", t('Field type is @fieldtype. It should be text.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->settings, $expected, "Field type text settings are correct"); // Integer field. $field_storage = FieldStorageConfig::load('node.field_test_two'); - $this->assertEqual($field_storage->type, "integer", t('Field type is @fieldtype. It should be integer.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "integer", t('Field type is @fieldtype. It should be integer.', array('@fieldtype' => $field_storage->type))); // Float field. $field_storage = FieldStorageConfig::load('node.field_test_three'); - $this->assertEqual($field_storage->type, "decimal", t('Field type is @fieldtype. It should be decimal.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "decimal", t('Field type is @fieldtype. It should be decimal.', array('@fieldtype' => $field_storage->type))); // Link field. $field_storage = FieldStorageConfig::load('node.field_test_link'); - $this->assertEqual($field_storage->type, "link", t('Field type is @fieldtype. It should be link.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "link", t('Field type is @fieldtype. It should be link.', array('@fieldtype' => $field_storage->type))); // File field. $field_storage = FieldStorageConfig::load('node.field_test_filefield'); - $this->assertEqual($field_storage->type, "file", t('Field type is @fieldtype. It should be file.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "file", t('Field type is @fieldtype. It should be file.', array('@fieldtype' => $field_storage->type))); $field_storage = FieldStorageConfig::load('node.field_test_imagefield'); - $this->assertEqual($field_storage->type, "image", t('Field type is @fieldtype. It should be image.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "image", t('Field type is @fieldtype. It should be image.', array('@fieldtype' => $field_storage->type))); $settings = $field_storage->getSettings(); - $this->assertEqual($settings['target_type'], 'file'); - $this->assertEqual($settings['uri_scheme'], 'public'); - $this->assertEqual($settings['default_image']['uuid'], ''); - $this->assertEqual(array_filter($settings['default_image']), array()); + $this->assertIdentical($settings['target_type'], 'file'); + $this->assertIdentical($settings['uri_scheme'], 'public'); + $this->assertIdentical(array_filter($settings['default_image']), array()); // Phone field. $field_storage = FieldStorageConfig::load('node.field_test_phone'); - $this->assertEqual($field_storage->type, "telephone", t('Field type is @fieldtype. It should be telephone.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "telephone", t('Field type is @fieldtype. It should be telephone.', array('@fieldtype' => $field_storage->type))); // Date field. $field_storage = FieldStorageConfig::load('node.field_test_datetime'); - $this->assertEqual($field_storage->type, "datetime", t('Field type is @fieldtype. It should be datetime.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "datetime", t('Field type is @fieldtype. It should be datetime.', array('@fieldtype' => $field_storage->type))); // Decimal field with radio buttons. $field_storage = FieldStorageConfig::load('node.field_test_decimal_radio_buttons'); - $this->assertEqual($field_storage->type, "list_float", t('Field type is @fieldtype. It should be list_float.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "list_float", t('Field type is @fieldtype. It should be list_float.', array('@fieldtype' => $field_storage->type))); $this->assertNotNull($field_storage->settings['allowed_values']['1.2'], t('First allowed value key is set to 1.2')); $this->assertNotNull($field_storage->settings['allowed_values']['2.1'], t('Second allowed value key is set to 2.1')); - $this->assertEqual($field_storage->settings['allowed_values']['1.2'], '1.2', t('First allowed value is set to 1.2')); - $this->assertEqual($field_storage->settings['allowed_values']['2.1'], '2.1', t('Second allowed value is set to 1.2')); + $this->assertIdentical($field_storage->settings['allowed_values']['1.2'], '1.2', t('First allowed value is set to 1.2')); + $this->assertIdentical($field_storage->settings['allowed_values']['2.1'], '2.1', t('Second allowed value is set to 1.2')); // Float field with a single checkbox. $field_storage = FieldStorageConfig::load('node.field_test_float_single_checkbox'); - $this->assertEqual($field_storage->type, "boolean", t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "boolean", t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->type))); // Integer field with a select list. $field_storage = FieldStorageConfig::load('node.field_test_integer_selectlist'); - $this->assertEqual($field_storage->type, "list_integer", t('Field type is @fieldtype. It should be list_integer.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "list_integer", t('Field type is @fieldtype. It should be list_integer.', array('@fieldtype' => $field_storage->type))); $this->assertNotNull($field_storage->settings['allowed_values']['1234'], t('First allowed value key is set to 1234')); $this->assertNotNull($field_storage->settings['allowed_values']['2341'], t('Second allowed value key is set to 2341')); $this->assertNotNull($field_storage->settings['allowed_values']['3412'], t('Third allowed value key is set to 3412')); $this->assertNotNull($field_storage->settings['allowed_values']['4123'], t('Fourth allowed value key is set to 4123')); - $this->assertEqual($field_storage->settings['allowed_values']['1234'], '1234', t('First allowed value is set to 1234')); - $this->assertEqual($field_storage->settings['allowed_values']['2341'], '2341', t('Second allowed value is set to 2341')); - $this->assertEqual($field_storage->settings['allowed_values']['3412'], '3412', t('Third allowed value is set to 3412')); - $this->assertEqual($field_storage->settings['allowed_values']['4123'], '4123', t('Fourth allowed value is set to 4123')); + $this->assertIdentical($field_storage->settings['allowed_values']['1234'], '1234', t('First allowed value is set to 1234')); + $this->assertIdentical($field_storage->settings['allowed_values']['2341'], '2341', t('Second allowed value is set to 2341')); + $this->assertIdentical($field_storage->settings['allowed_values']['3412'], '3412', t('Third allowed value is set to 3412')); + $this->assertIdentical($field_storage->settings['allowed_values']['4123'], '4123', t('Fourth allowed value is set to 4123')); // Text field with a single checkbox. $field_storage = FieldStorageConfig::load('node.field_test_text_single_checkbox'); - $this->assertEqual($field_storage->type, "boolean", t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->type))); + $this->assertIdentical($field_storage->type, "boolean", t('Field type is @fieldtype. It should be boolean.', array('@fieldtype' => $field_storage->type))); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldWidgetSettingsTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldWidgetSettingsTest.php index d9346b3cc0d864d17904dc90a01f52c31e9d923c..25612c200cdafffa1002025622a018cc9bdf34be 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldWidgetSettingsTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateFieldWidgetSettingsTest.php @@ -81,37 +81,37 @@ protected function setUp() { public function testWidgetSettings() { // Test the config can be loaded. $form_display = entity_load('entity_form_display', 'node.story.default'); - $this->assertEqual(is_null($form_display), FALSE, "Form display node.story.default loaded with config."); + $this->assertIdentical(is_null($form_display), FALSE, "Form display node.story.default loaded with config."); // Text field. $component = $form_display->getComponent('field_test'); $expected = array('weight' => 1, 'type' => 'text_textfield'); $expected['settings'] = array('size' => 60, 'placeholder' => ''); $expected['third_party_settings'] = array(); - $this->assertEqual($component, $expected, 'Text field settings are correct.'); + $this->assertIdentical($component, $expected, 'Text field settings are correct.'); // Integer field. $component = $form_display->getComponent('field_test_two'); $expected['type'] = 'number'; $expected['weight'] = 1; $expected['settings'] = array('placeholder' => ''); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Float field. $component = $form_display->getComponent('field_test_three'); $expected['weight'] = 2; - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Email field. $component = $form_display->getComponent('field_test_email'); $expected['type'] = 'email_default'; $expected['weight'] = 6; - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Link field. $component = $form_display->getComponent('field_test_link'); - $this->assertEqual($component['type'], 'link_default'); - $this->assertEqual($component['weight'], 7); + $this->assertIdentical($component['type'], 'link_default'); + $this->assertIdentical($component['weight'], 7); $this->assertFalse(array_filter($component['settings'])); // File field. @@ -119,36 +119,36 @@ public function testWidgetSettings() { $expected['type'] = 'file_generic'; $expected['weight'] = 8; $expected['settings'] = array('progress_indicator' => 'bar'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Image field. $component = $form_display->getComponent('field_test_imagefield'); $expected['type'] = 'image_image'; $expected['weight'] = 9; $expected['settings'] = array('progress_indicator' => 'bar', 'preview_image_style' => 'thumbnail'); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Phone field. $component = $form_display->getComponent('field_test_phone'); $expected['type'] = 'telephone_default'; $expected['weight'] = 13; $expected['settings'] = array('placeholder' => ''); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); // Date fields. $component = $form_display->getComponent('field_test_date'); $expected['type'] = 'datetime_default'; $expected['weight'] = 10; $expected['settings'] = array(); - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $component = $form_display->getComponent('field_test_datestamp'); $expected['weight'] = 11; - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); $component = $form_display->getComponent('field_test_datetime'); $expected['weight'] = 12; - $this->assertEqual($component, $expected); + $this->assertIdentical($component, $expected); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateFileTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateFileTest.php index 9799c5caaf13b5d0f276c1d772636b95e699cbeb..acbcd244383ba5c94b6ae24179263f77c4c509bd 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateFileTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateFileTest.php @@ -54,10 +54,10 @@ protected function setUp() { public function testFiles() { /** @var \Drupal\file\FileInterface $file */ $file = entity_load('file', 1); - $this->assertEqual($file->getFilename(), 'Image1.png'); - $this->assertEqual($file->getSize(), 39325); - $this->assertEqual($file->getFileUri(), 'public://image-1.png'); - $this->assertEqual($file->getMimeType(), 'image/png'); + $this->assertIdentical($file->getFilename(), 'Image1.png'); + $this->assertIdentical($file->getSize(), '39325'); + $this->assertIdentical($file->getFileUri(), 'public://image-1.png'); + $this->assertIdentical($file->getMimeType(), 'image/png'); // It is pointless to run the second half from MigrateDrupal6Test. if (empty($this->standalone)) { return; @@ -86,7 +86,7 @@ public function testFiles() { $executable->import(); $file = entity_load('file', 2); - $this->assertEqual($file->getFileUri(), 'public://core/modules/simpletest/files/image-2.jpg'); + $this->assertIdentical($file->getFileUri(), 'public://core/modules/simpletest/files/image-2.jpg'); // Ensure that a temporary file has been migrated. $file = entity_load('file', 6); diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateMenuTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateMenuTest.php index fc896482505ea22c918182b683397c93324f6f7b..5522673370360922a61cfd98a70b6f331871d36a 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateMenuTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateMenuTest.php @@ -39,9 +39,9 @@ protected function setUp() { */ public function testMenu() { $navigation_menu = Menu::load('navigation'); - $this->assertEqual($navigation_menu->id(), 'navigation'); - $this->assertEqual($navigation_menu->label(), 'Navigation'); - $this->assertEqual($navigation_menu->getDescription() , 'The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.'); + $this->assertIdentical($navigation_menu->id(), 'navigation'); + $this->assertIdentical($navigation_menu->label(), 'Navigation'); + $this->assertIdentical($navigation_menu->getDescription() , 'The navigation menu is provided by Drupal and is the main interactive menu for any site. It is usually the only menu that contains personalized links for authenticated users, and is often not even visible to anonymous users.'); // Test that we can re-import using the ConfigEntityBase destination. Database::getConnection('default', 'migrate') @@ -56,7 +56,7 @@ public function testMenu() { $executable->import(); $navigation_menu = entity_load_unchanged('menu', 'navigation'); - $this->assertEqual($navigation_menu->label(), 'Home Navigation'); + $this->assertIdentical($navigation_menu->label(), 'Home Navigation'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeBundleSettingsTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeBundleSettingsTest.php index 503780c94d9d3c490a7e0cf21cf470420ae2ed74..2306cbf7d26af33991f33c3694cc3ed03b3e17b1 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeBundleSettingsTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeBundleSettingsTest.php @@ -86,21 +86,21 @@ public function testNodeBundleSettings() { // Test settings on test_page bundle. $node = entity_create('node', array('type' => 'test_page')); - $this->assertEqual($node->status->value, TRUE); - $this->assertEqual($node->promote->value, TRUE); - $this->assertEqual($node->sticky->value, TRUE); + $this->assertIdentical($node->status->value, 1); + $this->assertIdentical($node->promote->value, 1); + $this->assertIdentical($node->sticky->value, 1); // Test settings for test_story bundle. $node = entity_create('node', array('type' => 'test_story')); - $this->assertEqual($node->status->value, TRUE); - $this->assertEqual($node->promote->value, TRUE); - $this->assertEqual($node->sticky->value, FALSE); + $this->assertIdentical($node->status->value, 1); + $this->assertIdentical($node->promote->value, 1); + $this->assertIdentical($node->sticky->value, 0); // Test settings for the test_event bundle. $node = entity_create('node', array('type' => 'test_event')); - $this->assertEqual($node->status->value, FALSE); - $this->assertEqual($node->promote->value, FALSE); - $this->assertEqual($node->sticky->value, TRUE); + $this->assertIdentical($node->status->value, 0); + $this->assertIdentical($node->promote->value, 0); + $this->assertIdentical($node->sticky->value, 1); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeRevisionTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeRevisionTest.php index c16044a8e6ba2492eb7dfcca06f3c1a6cd1fe5fd..d5aa3b3f5405b655b6a152bbdcd10b180e00a0fd 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeRevisionTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeRevisionTest.php @@ -55,22 +55,22 @@ protected function setUp() { public function testNodeRevision() { $node = \Drupal::entityManager()->getStorage('node')->loadRevision(2); /** @var \Drupal\node\NodeInterface $node */ - $this->assertEqual($node->id(), 1); - $this->assertEqual($node->getRevisionId(), 2); - $this->assertEqual($node->langcode->value, 'und'); - $this->assertEqual($node->getTitle(), 'Test title rev 2'); - $this->assertEqual($node->body->value, 'body test rev 2'); - $this->assertEqual($node->body->summary, 'teaser test rev 2'); - $this->assertEqual($node->getRevisionAuthor()->id(), 2); - $this->assertEqual($node->revision_log->value, 'modified rev 2'); - $this->assertEqual($node->getRevisionCreationTime(), '1390095702'); + $this->assertIdentical($node->id(), '1'); + $this->assertIdentical($node->getRevisionId(), '2'); + $this->assertIdentical($node->langcode->value, 'und'); + $this->assertIdentical($node->getTitle(), 'Test title rev 2'); + $this->assertIdentical($node->body->value, 'body test rev 2'); + $this->assertIdentical($node->body->summary, 'teaser test rev 2'); + $this->assertIdentical($node->getRevisionAuthor()->id(), '2'); + $this->assertIdentical($node->revision_log->value, 'modified rev 2'); + $this->assertIdentical($node->getRevisionCreationTime(), '1390095702'); $node = \Drupal::entityManager()->getStorage('node')->loadRevision(5); - $this->assertEqual($node->id(), 1); - $this->assertEqual($node->body->value, 'body test rev 3'); - $this->assertEqual($node->getRevisionAuthor()->id(), 1); - $this->assertEqual($node->revision_log->value, 'modified rev 3'); - $this->assertEqual($node->getRevisionCreationTime(), '1390095703'); + $this->assertIdentical($node->id(), '1'); + $this->assertIdentical($node->body->value, 'body test rev 3'); + $this->assertIdentical($node->getRevisionAuthor()->id(), '1'); + $this->assertIdentical($node->revision_log->value, 'modified rev 3'); + $this->assertIdentical($node->getRevisionCreationTime(), '1390095703'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTest.php index d682babcd331f2b2b5a99df9f404259af4b6ad89..6da7ab011f68c34afec44456965328f393325ccb 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTest.php @@ -38,24 +38,24 @@ protected function setUp() { */ public function testNode() { $node = Node::load(1); - $this->assertEqual($node->id(), 1, 'Node 1 loaded.'); - $this->assertEqual($node->langcode->value, 'und'); - $this->assertEqual($node->body->value, 'test'); - $this->assertEqual($node->body->summary, 'test'); - $this->assertEqual($node->body->format, 'filtered_html'); - $this->assertEqual($node->getType(), 'story', 'Node has the correct bundle.'); - $this->assertEqual($node->getTitle(), 'Test title', 'Node has the correct title.'); - $this->assertEqual($node->getCreatedTime(), 1388271197, 'Node has the correct created time.'); - $this->assertEqual($node->isSticky(), FALSE); - $this->assertEqual($node->getOwnerId(), 1); - $this->assertEqual($node->getRevisionCreationTime(), 1420861423); + $this->assertIdentical($node->id(), '1', 'Node 1 loaded.'); + $this->assertIdentical($node->langcode->value, 'und'); + $this->assertIdentical($node->body->value, 'test'); + $this->assertIdentical($node->body->summary, 'test'); + $this->assertIdentical($node->body->format, 'filtered_html'); + $this->assertIdentical($node->getType(), 'story', 'Node has the correct bundle.'); + $this->assertIdentical($node->getTitle(), 'Test title', 'Node has the correct title.'); + $this->assertIdentical($node->getCreatedTime(), '1388271197', 'Node has the correct created time.'); + $this->assertIdentical($node->isSticky(), FALSE); + $this->assertIdentical($node->getOwnerId(), '1'); + $this->assertIdentical($node->getRevisionCreationTime(), '1420861423'); /** @var \Drupal\node\NodeInterface $node_revision */ $node_revision = \Drupal::entityManager()->getStorage('node')->loadRevision(1); - $this->assertEqual($node_revision->getTitle(), 'Test title'); - $this->assertEqual($node_revision->getRevisionAuthor()->id(), 1, 'Node revision has the correct user'); + $this->assertIdentical($node_revision->getTitle(), 'Test title'); + $this->assertIdentical($node_revision->getRevisionAuthor()->id(), '1', 'Node revision has the correct user'); // This is empty on the first revision. - $this->assertEqual($node_revision->revision_log->value, ''); + $this->assertIdentical($node_revision->revision_log->value, ''); // It is pointless to run the second half from MigrateDrupal6Test. if (empty($this->standalone)) { @@ -81,10 +81,10 @@ public function testNode() { $executable->import(); $node = Node::load(1); - $this->assertEqual($node->getTitle(), 'New node title'); + $this->assertIdentical($node->getTitle(), 'New node title'); // Test a multi-column fields are correctly upgraded. - $this->assertEqual($node->body->value, 'test'); - $this->assertEqual($node->body->format, 'full_html'); + $this->assertIdentical($node->body->value, 'test'); + $this->assertIdentical($node->body->format, 'full_html'); $node = Node::load(3); // Test that format = 0 from source maps to filtered_html. diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php index 20343a611fae229bcc8ec4c4ed9e664de559439c..30bbae72a56a992310947c3718bdbe93e318bdb0 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTestBase.php @@ -64,6 +64,7 @@ protected function setUp() { 'type' => 'story', 'nid' => 1, 'vid' => 1, + 'revision_log' => '', )); $node->enforceIsNew(); $node->save(); @@ -72,6 +73,7 @@ protected function setUp() { 'type' => 'test_planet', 'nid' => 3, 'vid' => 4, + 'revision_log' => '', )); $node->enforceIsNew(); $node->save(); diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTypeTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTypeTest.php index 809bc4f9160c5748143d9cba9032d332a0b8a4e8..c90d1f1097b9f9324d48eb7abf64e7ef401f3e22 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTypeTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateNodeTypeTest.php @@ -47,42 +47,42 @@ public function testNodeType() { $migration = entity_load('migration', 'd6_node_type'); // Test the test_page content type. $node_type_page = entity_load('node_type', 'test_page'); - $this->assertEqual($node_type_page->id(), 'test_page', 'Node type test_page loaded'); + $this->assertIdentical($node_type_page->id(), 'test_page', 'Node type test_page loaded'); - $this->assertEqual($node_type_page->displaySubmitted(), TRUE); - $this->assertEqual($node_type_page->isNewRevision(), FALSE); - $this->assertEqual($node_type_page->getPreviewMode(), DRUPAL_OPTIONAL); - $this->assertEqual(array('test_page'), $migration->getIdMap()->lookupDestinationID(array('test_page'))); + $this->assertIdentical($node_type_page->displaySubmitted(), TRUE); + $this->assertIdentical($node_type_page->isNewRevision(), FALSE); + $this->assertIdentical($node_type_page->getPreviewMode(), DRUPAL_OPTIONAL); + $this->assertIdentical(array('test_page'), $migration->getIdMap()->lookupDestinationID(array('test_page'))); // Test we have a body field. $field = FieldConfig::loadByName('node', 'test_page', 'body'); - $this->assertEqual($field->getLabel(), 'This is the body field label', 'Body field was found.'); + $this->assertIdentical($field->getLabel(), 'This is the body field label', 'Body field was found.'); // Test the test_story content type. $node_type_story = entity_load('node_type', 'test_story'); - $this->assertEqual($node_type_story->id(), 'test_story', 'Node type test_story loaded'); + $this->assertIdentical($node_type_story->id(), 'test_story', 'Node type test_story loaded'); - $this->assertEqual($node_type_story->displaySubmitted(), TRUE); - $this->assertEqual($node_type_story->isNewRevision(), FALSE); - $this->assertEqual($node_type_story->getPreviewMode(), DRUPAL_OPTIONAL); - $this->assertEqual(array('test_story'), $migration->getIdMap()->lookupDestinationID(array('test_story'))); + $this->assertIdentical($node_type_story->displaySubmitted(), TRUE); + $this->assertIdentical($node_type_story->isNewRevision(), FALSE); + $this->assertIdentical($node_type_story->getPreviewMode(), DRUPAL_OPTIONAL); + $this->assertIdentical(array('test_story'), $migration->getIdMap()->lookupDestinationID(array('test_story'))); // Test we don't have a body field. $field = FieldConfig::loadByName('node', 'test_story', 'body'); - $this->assertEqual($field, NULL, 'No body field found'); + $this->assertIdentical($field, NULL, 'No body field found'); // Test the test_event content type. $node_type_event = entity_load('node_type', 'test_event'); - $this->assertEqual($node_type_event->id(), 'test_event', 'Node type test_event loaded'); + $this->assertIdentical($node_type_event->id(), 'test_event', 'Node type test_event loaded'); - $this->assertEqual($node_type_event->displaySubmitted(), TRUE); - $this->assertEqual($node_type_event->isNewRevision(), TRUE); - $this->assertEqual($node_type_event->getPreviewMode(), DRUPAL_OPTIONAL); - $this->assertEqual(array('test_event'), $migration->getIdMap()->lookupDestinationID(array('test_event'))); + $this->assertIdentical($node_type_event->displaySubmitted(), TRUE); + $this->assertIdentical($node_type_event->isNewRevision(), TRUE); + $this->assertIdentical($node_type_event->getPreviewMode(), DRUPAL_OPTIONAL); + $this->assertIdentical(array('test_event'), $migration->getIdMap()->lookupDestinationID(array('test_event'))); // Test we have a body field. $field = FieldConfig::loadByName('node', 'test_event', 'body'); - $this->assertEqual($field->getLabel(), 'Body', 'Body field was found.'); + $this->assertIdentical($field->getLabel(), 'Body', 'Body field was found.'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateSearchPageTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateSearchPageTest.php index c17876bd2a614b550d45a8dcd373cbcaef0b4e0a..59bce29faac96c59d84129cdc53e42bc06212a5d 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateSearchPageTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateSearchPageTest.php @@ -47,15 +47,15 @@ public function testSearchPage() { $id = 'node_search'; /** @var \Drupal\search\Entity\SearchPage $search_page */ $search_page = entity_load('search_page', $id); - $this->assertEqual($search_page->id(), $id); + $this->assertIdentical($search_page->id(), $id); $configuration = $search_page->getPlugin()->getConfiguration(); - $this->assertEqual($configuration['rankings'], array( + $this->assertIdentical($configuration['rankings'], array( 'comments' => 5, 'relevance' => 2, 'sticky' => 8, 'views' => 1, )); - $this->assertEqual($search_page->getPath(), 'node'); + $this->assertIdentical($search_page->getPath(), 'node'); // Test that we can re-import using the EntitySearchPage destination. Database::getConnection('default', 'migrate') @@ -70,7 +70,7 @@ public function testSearchPage() { $search_page = entity_load('search_page', $id); $configuration = $search_page->getPlugin()->getConfiguration(); - $this->assertEqual($configuration['rankings']['comments'], 4); + $this->assertIdentical($configuration['rankings']['comments'], 4); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyTermTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyTermTest.php index 9e8b315586fd2b4d015f35174968868dd6b1661f..08c6e097b5e83b1380f30e9c1c4260ca8ead0d72 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyTermTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyTermTest.php @@ -92,17 +92,17 @@ public function testTaxonomyTerms() { $term = $terms[$tid]; $this->assertIdentical($term->name->value, "term {$tid} of vocabulary {$values['source_vid']}"); $this->assertIdentical($term->description->value, "description of term {$tid} of vocabulary {$values['source_vid']}"); - $this->assertEqual($term->vid->target_id, $values['vid']); - $this->assertEqual($term->weight->value, $values['weight']); + $this->assertIdentical($term->vid->target_id, $values['vid']); + $this->assertIdentical($term->weight->value, (string) $values['weight']); if ($values['parent'] === array(0)) { - $this->assertEqual($term->parent->target_id, 0); + $this->assertNull($term->parent->target_id); } else { $parents = array(); foreach (taxonomy_term_load_parents($tid) as $parent) { - $parents[] = $parent->id(); + $parents[] = (int) $parent->id(); } - $this->assertEqual($values['parent'], $parents); + $this->assertIdentical($values['parent'], $parents); } } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyVocabularyTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyVocabularyTest.php index ff3c3f2abd085c95f9bdcb26b8ab55f7c42d2b8b..4764dad1fcee23c1199a0a580168ffc7d1b43661 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyVocabularyTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateTaxonomyVocabularyTest.php @@ -47,17 +47,17 @@ public function testTaxonomyVocabulary() { for ($i = 0; $i < 3; $i++) { $j = $i + 1; $vocabulary = Vocabulary::load("vocabulary_{$j}_i_{$i}_"); - $this->assertEqual(array($vocabulary->id()), entity_load('migration', 'd6_taxonomy_vocabulary')->getIdMap()->lookupDestinationID(array($j))); - $this->assertEqual($vocabulary->label(), "vocabulary $j (i=$i)"); - $this->assertEqual($vocabulary->getDescription(), "description of vocabulary $j (i=$i)"); - $this->assertEqual($vocabulary->getHierarchy(), $i); - $this->assertEqual($vocabulary->get('weight'), 4 + $i); + $this->assertIdentical(array($vocabulary->id()), entity_load('migration', 'd6_taxonomy_vocabulary')->getIdMap()->lookupDestinationID(array($j))); + $this->assertIdentical($vocabulary->label(), "vocabulary $j (i=$i)"); + $this->assertIdentical($vocabulary->getDescription(), "description of vocabulary $j (i=$i)"); + $this->assertIdentical($vocabulary->getHierarchy(), $i); + $this->assertIdentical($vocabulary->get('weight'), 4 + $i); } $vocabulary = Vocabulary::load('vocabulary_name_much_longer_than'); - $this->assertEqual($vocabulary->label(), 'vocabulary name much longer than thirty two characters'); - $this->assertEqual($vocabulary->getDescription(), 'description of vocabulary name much longer than thirty two characters'); - $this->assertEqual($vocabulary->getHierarchy(), 3); - $this->assertEqual($vocabulary->get('weight'), 7); + $this->assertIdentical($vocabulary->label(), 'vocabulary name much longer than thirty two characters'); + $this->assertIdentical($vocabulary->getDescription(), 'description of vocabulary name much longer than thirty two characters'); + $this->assertIdentical($vocabulary->getHierarchy(), 3); + $this->assertIdentical($vocabulary->get('weight'), 7); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeRevisionTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeRevisionTest.php index 6992929fa20e24ff38d1817bd4bb3fd2f3f145a7..74df6980832c2fe62b9006605406a21fe062aa36 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeRevisionTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeRevisionTest.php @@ -43,9 +43,9 @@ protected function setUp() { */ public function testTermRevisionNode() { $node = \Drupal::entityManager()->getStorage('node')->loadRevision(2); - $this->assertEqual(count($node->vocabulary_3_i_2_), 2); - $this->assertEqual($node->vocabulary_3_i_2_[0]->target_id, 4); - $this->assertEqual($node->vocabulary_3_i_2_[1]->target_id, 5); + $this->assertIdentical(count($node->vocabulary_3_i_2_), 2); + $this->assertIdentical($node->vocabulary_3_i_2_[0]->target_id, '4'); + $this->assertIdentical($node->vocabulary_3_i_2_[1]->target_id, '5'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeTest.php index cd515922570f75c3b455e7c5df41eb2f8012e0d4..2b81ad769a26bd0b67488dcdf764bb8dcc740569 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateTermNodeTest.php @@ -38,12 +38,12 @@ public function testTermNode() { $node_storage->resetCache(array(1, 2)); $nodes = Node::loadMultiple(array(1, 2)); $node = $nodes[1]; - $this->assertEqual(count($node->vocabulary_1_i_0_), 1); - $this->assertEqual($node->vocabulary_1_i_0_[0]->target_id, 1); + $this->assertIdentical(count($node->vocabulary_1_i_0_), 1); + $this->assertIdentical($node->vocabulary_1_i_0_[0]->target_id, '1'); $node = $nodes[2]; - $this->assertEqual(count($node->vocabulary_2_i_1_), 2); - $this->assertEqual($node->vocabulary_2_i_1_[0]->target_id, 2); - $this->assertEqual($node->vocabulary_2_i_1_[1]->target_id, 3); + $this->assertIdentical(count($node->vocabulary_2_i_1_), 2); + $this->assertIdentical($node->vocabulary_2_i_1_[0]->target_id, '2'); + $this->assertIdentical($node->vocabulary_2_i_1_[1]->target_id, '3'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityDisplayTest.php index e95b243eef9cad4f796c2c12a6941aa3c73b86e9..f69630fdd5ff444571cf420746fe02e5c2303c79 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityDisplayTest.php @@ -57,18 +57,18 @@ protected function setUp() { public function testUploadEntityDisplay() { $display = entity_get_display('node', 'page', 'default'); $component = $display->getComponent('upload'); - $this->assertEqual($component['type'], 'file_default'); + $this->assertIdentical($component['type'], 'file_default'); $display = entity_get_display('node', 'story', 'default'); $component = $display->getComponent('upload'); - $this->assertEqual($component['type'], 'file_default'); + $this->assertIdentical($component['type'], 'file_default'); // Assure this doesn't exist. $display = entity_get_display('node', 'article', 'default'); $component = $display->getComponent('upload'); $this->assertTrue(is_null($component)); - $this->assertEqual(array('node', 'page', 'default', 'upload'), entity_load('migration', 'd6_upload_entity_display')->getIdMap()->lookupDestinationID(array('page'))); + $this->assertIdentical(array('node', 'page', 'default', 'upload'), entity_load('migration', 'd6_upload_entity_display')->getIdMap()->lookupDestinationID(array('page'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityFormDisplayTest.php index 3eed337331b48cd171ad957d7771c6aafad9fd21..a6c853314b72bd48aba4490b2a754a59439ecb01 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityFormDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadEntityFormDisplayTest.php @@ -58,18 +58,18 @@ protected function setUp() { public function testUploadEntityFormDisplay() { $display = entity_get_form_display('node', 'page', 'default'); $component = $display->getComponent('upload'); - $this->assertEqual($component['type'], 'file_generic'); + $this->assertIdentical($component['type'], 'file_generic'); $display = entity_get_form_display('node', 'story', 'default'); $component = $display->getComponent('upload'); - $this->assertEqual($component['type'], 'file_generic'); + $this->assertIdentical($component['type'], 'file_generic'); // Assure this doesn't exist. $display = entity_get_form_display('node', 'article', 'default'); $component = $display->getComponent('upload'); $this->assertTrue(is_null($component)); - $this->assertEqual(array('node', 'page', 'default', 'upload'), entity_load('migration', 'd6_upload_entity_form_display')->getIdMap()->lookupDestinationID(array('page'))); + $this->assertIdentical(array('node', 'page', 'default', 'upload'), entity_load('migration', 'd6_upload_entity_form_display')->getIdMap()->lookupDestinationID(array('page'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadFieldTest.php index 49d2f73820aa2eafd168040165472cfa85a4c79c..332181efbe61cf75ed646507cbd5a438b8f15157 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadFieldTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadFieldTest.php @@ -40,8 +40,8 @@ protected function setUp() { */ public function testUpload() { $field_storage = FieldStorageConfig::load('node.upload'); - $this->assertEqual($field_storage->id(), 'node.upload'); - $this->assertEqual(array('node', 'upload'), entity_load('migration', 'd6_upload_field')->getIdMap()->lookupDestinationID(array(''))); + $this->assertIdentical($field_storage->id(), 'node.upload'); + $this->assertIdentical(array('node', 'upload'), entity_load('migration', 'd6_upload_field')->getIdMap()->lookupDestinationID(array(''))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadInstanceTest.php index bc717fad758b002f8f6915384d83f786f56ecd41..e613b988830d72951228d0d1926ddfc36e0331bc 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadInstanceTest.php @@ -68,19 +68,19 @@ protected function setUp() { public function testUploadFieldInstance() { $field = FieldConfig::load('node.page.upload'); $settings = $field->getSettings(); - $this->assertEqual($field->id(), 'node.page.upload'); - $this->assertEqual($settings['file_extensions'], 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'); - $this->assertEqual($settings['max_filesize'], '1MB'); - $this->assertEqual($settings['description_field'], TRUE); + $this->assertIdentical($field->id(), 'node.page.upload'); + $this->assertIdentical($settings['file_extensions'], 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'); + $this->assertIdentical($settings['max_filesize'], '1MB'); + $this->assertIdentical($settings['description_field'], TRUE); $field = FieldConfig::load('node.story.upload'); - $this->assertEqual($field->id(), 'node.story.upload'); + $this->assertIdentical($field->id(), 'node.story.upload'); // Shouldn't exist. $field = FieldConfig::load('node.article.upload'); $this->assertTrue(is_null($field)); - $this->assertEqual(array('node', 'page', 'upload'), entity_load('migration', 'd6_upload_field_instance')->getIdMap()->lookupDestinationID(array('page'))); + $this->assertIdentical(array('node', 'page', 'upload'), entity_load('migration', 'd6_upload_field_instance')->getIdMap()->lookupDestinationID(array('page'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadTest.php index ca1ee622fc37dbf21c25f7a5c74da347e0f857bf..1c4cd87c21091e5f4555a197775d7ee376f749af 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUploadTest.php @@ -36,19 +36,19 @@ function testUpload() { $node_storage->resetCache(array(1, 2)); $nodes = Node::loadMultiple(array(1, 2)); $node = $nodes[1]; - $this->assertEqual(count($node->upload), 1); - $this->assertEqual($node->upload[0]->target_id, 1); - $this->assertEqual($node->upload[0]->description, 'file 1-1-1'); - $this->assertEqual($node->upload[0]->isDisplayed(), FALSE); + $this->assertIdentical(count($node->upload), 1); + $this->assertIdentical($node->upload[0]->target_id, '1'); + $this->assertIdentical($node->upload[0]->description, 'file 1-1-1'); + $this->assertIdentical($node->upload[0]->isDisplayed(), FALSE); $node = $nodes[2]; - $this->assertEqual(count($node->upload), 2); - $this->assertEqual($node->upload[0]->target_id, 3); - $this->assertEqual($node->upload[0]->description, 'file 2-3-3'); - $this->assertEqual($node->upload[0]->isDisplayed(), FALSE); - $this->assertEqual($node->upload[1]->target_id, 2); - $this->assertEqual($node->upload[1]->isDisplayed(), TRUE); - $this->assertEqual($node->upload[1]->description, 'file 2-3-2'); + $this->assertIdentical(count($node->upload), 2); + $this->assertIdentical($node->upload[0]->target_id, '3'); + $this->assertIdentical($node->upload[0]->description, 'file 2-3-3'); + $this->assertIdentical($node->upload[0]->isDisplayed(), FALSE); + $this->assertIdentical($node->upload[1]->target_id, '2'); + $this->assertIdentical($node->upload[1]->isDisplayed(), TRUE); + $this->assertIdentical($node->upload[1]->description, 'file 2-3-2'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUrlAliasTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUrlAliasTest.php index 92bcc5177a96a94f00957841a7195a595f88b97b..7debfa11eb8a7dae55b74873da36a4a012d94f72 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUrlAliasTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUrlAliasTest.php @@ -46,7 +46,7 @@ public function testUrlAlias() { ); $path = \Drupal::service('path.alias_storage')->load($conditions); $this->assertNotNull($path, "Path alias for node/1 successfully loaded."); - $this->assertEqual(array(1), $migration->getIdMap()->lookupDestinationID(array($path['pid'])), "Test IdMap"); + $this->assertIdentical(array('1'), $migration->getIdMap()->lookupDestinationID(array($path['pid'])), "Test IdMap"); $conditions = array( 'source' => 'node/2', 'alias' => 'alias-two', @@ -70,7 +70,7 @@ public function testUrlAlias() { $executable->import(); $path = \Drupal::service('path.alias_storage')->load(array('pid' => $path['pid'])); - $this->assertEqual($path['alias'], 'new-url-alias'); + $this->assertIdentical($path['alias'], 'new-url-alias'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php index 040c906d4a161023cbd74047542871676fe91c84..ef718d895c318947bf341fc6e438f39f2bb7baf4 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityDisplayTest.php @@ -48,10 +48,10 @@ protected function setUp() { public function testUserPictureEntityDisplay() { $display = entity_get_display('user', 'user', 'default'); $component = $display->getComponent('user_picture'); - $this->assertEqual($component['type'], 'image'); - $this->assertEqual($component['settings']['image_link'], 'content'); + $this->assertIdentical($component['type'], 'image'); + $this->assertIdentical($component['settings']['image_link'], 'content'); - $this->assertEqual(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_display')->getIdMap()->lookupDestinationID(array(''))); + $this->assertIdentical(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_display')->getIdMap()->lookupDestinationID(array(''))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php index 3a1b06a4907ad874ab34ba1b479660788cbaa96f..d272bba0d1b0475cbee6910554a35f405ed38f24 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureEntityFormDisplayTest.php @@ -47,10 +47,10 @@ protected function setUp() { public function testUserPictureEntityFormDisplay() { $display = entity_get_form_display('user', 'user', 'default'); $component = $display->getComponent('user_picture'); - $this->assertEqual($component['type'], 'image_image'); - $this->assertEqual($component['settings']['progress_indicator'], 'throbber'); + $this->assertIdentical($component['type'], 'image_image'); + $this->assertIdentical($component['settings']['progress_indicator'], 'throbber'); - $this->assertEqual(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_form_display')->getIdMap()->lookupDestinationID(array(''))); + $this->assertIdentical(array('user', 'user', 'default', 'user_picture'), entity_load('migration', 'd6_user_picture_entity_form_display')->getIdMap()->lookupDestinationID(array(''))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php index e0f34bb34861987cef64e50d45018e0b3118e5c8..ed6e69b6966dc465c1e3a7de32255b778f440d2a 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFieldTest.php @@ -35,8 +35,8 @@ protected function setUp() { */ public function testUserPictureField() { $field_storage = FieldStorageConfig::load('user.user_picture'); - $this->assertEqual($field_storage->id(), 'user.user_picture'); - $this->assertEqual(array('user', 'user_picture'), entity_load('migration', 'd6_user_picture_field')->getIdMap()->lookupDestinationID(array(''))); + $this->assertIdentical($field_storage->id(), 'user.user_picture'); + $this->assertIdentical(array('user', 'user_picture'), entity_load('migration', 'd6_user_picture_field')->getIdMap()->lookupDestinationID(array(''))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php index ecd279f6466692bb06523d191304bf2058a5c58a..362796452b042fd31c48aecc5afde518672858a4 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureFileTest.php @@ -56,14 +56,14 @@ public function testUserPictures() { $files = entity_load_multiple('file', $file_ids); /** @var \Drupal\file\FileInterface $file */ $file = array_shift($files); - $this->assertEqual($file->getFilename(), 'image-test.jpg'); - $this->assertEqual($file->getFileUri(), 'public://image-test.jpg'); - $this->assertEqual($file->getSize(), 1901); - $this->assertEqual($file->getMimeType(), 'image/jpeg'); + $this->assertIdentical($file->getFilename(), 'image-test.jpg'); + $this->assertIdentical($file->getFileUri(), 'public://image-test.jpg'); + $this->assertIdentical($file->getSize(), '1901'); + $this->assertIdentical($file->getMimeType(), 'image/jpeg'); $file = array_shift($files); - $this->assertEqual($file->getFilename(), 'image-test.png'); - $this->assertEqual($file->getFileUri(), 'public://image-test.png'); + $this->assertIdentical($file->getFilename(), 'image-test.png'); + $this->assertIdentical($file->getFileUri(), 'public://image-test.png'); $this->assertFalse($files); } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php index edd676a6d72737d9b9d181f1b09bae1f27af6f11..08015a34c0fab618cf288141c78e0141b094f735 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserPictureInstanceTest.php @@ -55,12 +55,12 @@ protected function setUp() { public function testUserPictureFieldInstance() { $field = FieldConfig::load('user.user.user_picture'); $settings = $field->getSettings(); - $this->assertEqual($settings['file_extensions'], 'png gif jpg jpeg'); - $this->assertEqual($settings['file_directory'], 'pictures'); - $this->assertEqual($settings['max_filesize'], '30KB'); - $this->assertEqual($settings['max_resolution'], '85x85'); + $this->assertIdentical($settings['file_extensions'], 'png gif jpg jpeg'); + $this->assertIdentical($settings['file_directory'], 'pictures'); + $this->assertIdentical($settings['max_filesize'], '30KB'); + $this->assertIdentical($settings['max_resolution'], '85x85'); - $this->assertEqual(array('user', 'user', 'user_picture'), entity_load('migration', 'd6_user_picture_field_instance')->getIdMap()->lookupDestinationID(array(''))); + $this->assertIdentical(array('user', 'user', 'user_picture'), entity_load('migration', 'd6_user_picture_field_instance')->getIdMap()->lookupDestinationID(array(''))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php index 69dc0ebacd032946f55d7635f6f853686f979233..001935ed895c84fa48802bbefd09928fc6531cf4 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityDisplayTest.php @@ -110,15 +110,15 @@ public function testUserProfileFields() { // Test a text field. $component = $display->getComponent('profile_color'); - $this->assertEqual($component['type'], 'text_default'); + $this->assertIdentical($component['type'], 'text_default'); // Test a list field. $component = $display->getComponent('profile_bands'); - $this->assertEqual($component['type'], 'text_default'); + $this->assertIdentical($component['type'], 'text_default'); // Test a date field. $component = $display->getComponent('profile_birthdate'); - $this->assertEqual($component['type'], 'datetime_default'); + $this->assertIdentical($component['type'], 'datetime_default'); // Test PROFILE_PRIVATE field is hidden. $this->assertNull($display->getComponent('profile_sell_address')); diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php index a92ce815a2dbbb4872e0d86de9c8999e16fd56ee..23583ca642515298321fa08d3bb421cce65a7bdc 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileEntityFormDisplayTest.php @@ -107,15 +107,15 @@ public function testUserProfileEntityFormDisplay() { // Test a text field. $component = $display->getComponent('profile_color'); - $this->assertEqual($component['type'], 'text_textfield'); + $this->assertIdentical($component['type'], 'text_textfield'); // Test a list field. $component = $display->getComponent('profile_bands'); - $this->assertEqual($component['type'], 'text_textfield'); + $this->assertIdentical($component['type'], 'text_textfield'); // Test a date field. $component = $display->getComponent('profile_birthdate'); - $this->assertEqual($component['type'], 'datetime_default'); + $this->assertIdentical($component['type'], 'datetime_default'); // Test PROFILE_PRIVATE field is hidden. $this->assertNull($display->getComponent('profile_sell_address')); @@ -125,8 +125,8 @@ public function testUserProfileEntityFormDisplay() { // Test that a checkbox field has the proper display label setting. $component = $display->getComponent('profile_love_migrations'); - $this->assertEqual($component['type'], 'boolean_checkbox'); - $this->assertEqual($component['settings']['display_label'], true); + $this->assertIdentical($component['type'], 'boolean_checkbox'); + $this->assertIdentical($component['settings']['display_label'], true); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php index faa481b07c9ad387910368c418da0a8b4ee55159..9ed9249d9b72ac0657593c7969b56510c03daf4a 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldInstanceTest.php @@ -54,45 +54,45 @@ protected function setUp() { public function testUserProfileFields() { // Migrated a text field. $field = FieldConfig::load('user.user.profile_color'); - $this->assertEqual($field->label(), 'Favorite color'); - $this->assertEqual($field->getDescription(), 'List your favorite color'); + $this->assertIdentical($field->label(), 'Favorite color'); + $this->assertIdentical($field->getDescription(), 'List your favorite color'); // Migrated a textarea. $field = FieldConfig::load('user.user.profile_biography'); - $this->assertEqual($field->label(), 'Biography'); - $this->assertEqual($field->getDescription(), 'Tell people a little bit about yourself'); + $this->assertIdentical($field->label(), 'Biography'); + $this->assertIdentical($field->getDescription(), 'Tell people a little bit about yourself'); // Migrated checkbox field. $field = FieldConfig::load('user.user.profile_sell_address'); - $this->assertEqual($field->label(), 'Sell your email address?'); - $this->assertEqual($field->getDescription(), "If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!"); + $this->assertIdentical($field->label(), 'Sell your email address?'); + $this->assertIdentical($field->getDescription(), "If you check this box, we'll sell your address to spammers to help line the pockets of our shareholders. Thanks!"); // Migrated selection field. $field = FieldConfig::load('user.user.profile_sold_to'); - $this->assertEqual($field->label(), 'Sales Category'); - $this->assertEqual($field->getDescription(), "Select the sales categories to which this user's address was sold."); + $this->assertIdentical($field->label(), 'Sales Category'); + $this->assertIdentical($field->getDescription(), "Select the sales categories to which this user's address was sold."); // Migrated list field. $field = FieldConfig::load('user.user.profile_bands'); - $this->assertEqual($field->label(), 'Favorite bands'); - $this->assertEqual($field->getDescription(), "Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites."); + $this->assertIdentical($field->label(), 'Favorite bands'); + $this->assertIdentical($field->getDescription(), "Enter your favorite bands. When you've saved your profile, you'll be able to find other people with the same favorites."); /* // Migrated URL field. $field = FieldConfig::load('user.user.profile_blog'); - $this->assertEqual($field->label(), 'Your blog'); - $this->assertEqual($field->getDescription(), "Paste the full URL, including http://, of your personal blog."); + $this->assertIdentical($field->label(), 'Your blog'); + $this->assertIdentical($field->getDescription(), "Paste the full URL, including http://, of your personal blog."); */ // Migrated date field. $field = FieldConfig::load('user.user.profile_birthdate'); - $this->assertEqual($field->label(), 'Birthdate'); - $this->assertEqual($field->getDescription(), "Enter your birth date and we'll send you a coupon."); + $this->assertIdentical($field->label(), 'Birthdate'); + $this->assertIdentical($field->getDescription(), "Enter your birth date and we'll send you a coupon."); // Another migrated checkbox field, with a different source visibility setting. $field = FieldConfig::load('user.user.profile_love_migrations'); - $this->assertEqual($field->label(), 'I love migrations'); - $this->assertEqual($field->getDescription(), "If you check this box, you love migrations."); + $this->assertIdentical($field->label(), 'I love migrations'); + $this->assertIdentical($field->getDescription(), "If you check this box, you love migrations."); } /** diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php index 0c3b5c6736b7246a9621d583215cc01174d66d82..35644cea55430dc0c767b84be0a139a5634d7718 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileFieldTest.php @@ -44,22 +44,22 @@ protected function setUp() { public function testUserProfileFields() { // Migrated a text field. $field_storage = FieldStorageConfig::load('user.profile_color'); - $this->assertEqual($field_storage->type, 'text', 'Field type is text.'); - $this->assertEqual($field_storage->cardinality, 1, 'Text field has correct cardinality'); + $this->assertIdentical($field_storage->type, 'text', 'Field type is text.'); + $this->assertIdentical($field_storage->cardinality, 1, 'Text field has correct cardinality'); // Migrated a textarea. $field_storage = FieldStorageConfig::load('user.profile_biography'); - $this->assertEqual($field_storage->type, 'text_long', 'Field type is text_long.'); + $this->assertIdentical($field_storage->type, 'text_long', 'Field type is text_long.'); // Migrated checkbox field. $field_storage = FieldStorageConfig::load('user.profile_sell_address'); - $this->assertEqual($field_storage->type, 'boolean', 'Field type is boolean.'); + $this->assertIdentical($field_storage->type, 'boolean', 'Field type is boolean.'); // Migrated selection field. $field_storage = FieldStorageConfig::load('user.profile_sold_to'); - $this->assertEqual($field_storage->type, 'list_string', 'Field type is list_string.'); + $this->assertIdentical($field_storage->type, 'list_string', 'Field type is list_string.'); $settings = $field_storage->getSettings(); - $this->assertEqual($settings['allowed_values'], array( + $this->assertIdentical($settings['allowed_values'], array( 'Pill spammers' => 'Pill spammers', 'Fitness spammers' => 'Fitness spammers', 'Back\slash' => 'Back\slash', @@ -68,23 +68,23 @@ public function testUserProfileFields() { 'Faithful servant' => 'Faithful servant', 'Anonymous donor' => 'Anonymous donor', )); - $this->assertEqual($field_storage->type, 'list_string', 'Field type is list_string.'); + $this->assertIdentical($field_storage->type, 'list_string', 'Field type is list_string.'); // Migrated list field. $field_storage = FieldStorageConfig::load('user.profile_bands'); - $this->assertEqual($field_storage->type, 'text', 'Field type is text.'); - $this->assertEqual($field_storage->cardinality, -1, 'List field has correct cardinality'); + $this->assertIdentical($field_storage->type, 'text', 'Field type is text.'); + $this->assertIdentical($field_storage->cardinality, -1, 'List field has correct cardinality'); /* // Migrated URL field. $field_storage = FieldStorageConfig::load('user.profile_blog'); - $this->assertEqual($field_storage->type, 'link', 'Field type is link.'); + $this->assertIdentical($field_storage->type, 'link', 'Field type is link.'); */ // Migrated date field. $field_storage = FieldStorageConfig::load('user.profile_birthdate'); - $this->assertEqual($field_storage->type, 'datetime', 'Field type is datetime.'); - $this->assertEqual($field_storage->settings['datetime_type'], 'date'); + $this->assertIdentical($field_storage->type, 'datetime', 'Field type is datetime.'); + $this->assertIdentical($field_storage->settings['datetime_type'], 'date'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php index 465b6d5081f8b28479ecb3f82dfb0c6e37b26cba..a0a7bb08c62ccd1bd177205c1aa62c178d0e689b 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserProfileValuesTest.php @@ -152,24 +152,24 @@ protected function setUp() { public function testUserProfileValues() { $user = User::load(2); $this->assertFalse(is_null($user)); - $this->assertEqual($user->profile_color->value, 'red'); - $this->assertEqual($user->profile_biography->value, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.'); - $this->assertEqual($user->profile_sell_address->value, '1'); - $this->assertEqual($user->profile_sold_to->value, 'Back\slash'); - $this->assertEqual($user->profile_bands[0]->value, 'AC/DC'); - $this->assertEqual($user->profile_bands[1]->value, 'Eagles'); - $this->assertEqual($user->profile_bands[2]->value, 'Elton John'); - $this->assertEqual($user->profile_bands[3]->value, 'Lemonheads'); - $this->assertEqual($user->profile_bands[4]->value, 'Rolling Stones'); - $this->assertEqual($user->profile_bands[5]->value, 'Queen'); - $this->assertEqual($user->profile_bands[6]->value, 'The White Stripes'); - $this->assertEqual($user->profile_birthdate->value, '1974-06-02'); + $this->assertIdentical($user->profile_color->value, 'red'); + $this->assertIdentical($user->profile_biography->value, 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam nulla sapien, congue nec risus ut, adipiscing aliquet felis. Maecenas quis justo vel nulla varius euismod. Quisque metus metus, cursus sit amet sem non, bibendum vehicula elit. Cras dui nisl, eleifend at iaculis vitae, lacinia ut felis. Nullam aliquam ligula volutpat nulla consectetur accumsan. Maecenas tincidunt molestie diam, a accumsan enim fringilla sit amet. Morbi a tincidunt tellus. Donec imperdiet scelerisque porta. Sed quis sem bibendum eros congue sodales. Vivamus vel fermentum est, at rutrum orci. Nunc consectetur purus ut dolor pulvinar, ut volutpat felis congue. Cras tincidunt odio sed neque sollicitudin, vehicula tempor metus scelerisque.'); + $this->assertIdentical($user->profile_sell_address->value, '1'); + $this->assertIdentical($user->profile_sold_to->value, 'Back\slash'); + $this->assertIdentical($user->profile_bands[0]->value, 'AC/DC'); + $this->assertIdentical($user->profile_bands[1]->value, 'Eagles'); + $this->assertIdentical($user->profile_bands[2]->value, 'Elton John'); + $this->assertIdentical($user->profile_bands[3]->value, 'Lemonheads'); + $this->assertIdentical($user->profile_bands[4]->value, 'Rolling Stones'); + $this->assertIdentical($user->profile_bands[5]->value, 'Queen'); + $this->assertIdentical($user->profile_bands[6]->value, 'The White Stripes'); + $this->assertIdentical($user->profile_birthdate->value, '1974-06-02'); $user = User::load(8); - $this->assertEqual($user->profile_sold_to->value, 'Forward/slash'); + $this->assertIdentical($user->profile_sold_to->value, 'Forward/slash'); $user = User::load(15); - $this->assertEqual($user->profile_sold_to->value, 'Dot.in.the.middle'); + $this->assertIdentical($user->profile_sold_to->value, 'Dot.in.the.middle'); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php index bb3ad6f7b82ddd93a33ee9aba0f165d041554dbc..3f977bcbe8f880ca39a0753e0c5f9832f59e73ac 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserRoleTest.php @@ -61,22 +61,22 @@ public function testUserRole() { $migration = entity_load('migration', 'd6_user_role'); $rid = 'anonymous'; $anonymous = Role::load($rid); - $this->assertEqual($anonymous->id(), $rid); - $this->assertEqual($anonymous->getPermissions(), array('migrate test anonymous permission', 'use text format filtered_html')); - $this->assertEqual(array($rid), $migration->getIdMap()->lookupDestinationId(array(1))); + $this->assertIdentical($anonymous->id(), $rid); + $this->assertIdentical($anonymous->getPermissions(), array('migrate test anonymous permission', 'use text format filtered_html')); + $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(1))); $rid = 'authenticated'; $authenticated = Role::load($rid); - $this->assertEqual($authenticated->id(), $rid); - $this->assertEqual($authenticated->getPermissions(), array('migrate test authenticated permission', 'use text format filtered_html')); - $this->assertEqual(array($rid), $migration->getIdMap()->lookupDestinationId(array(2))); + $this->assertIdentical($authenticated->id(), $rid); + $this->assertIdentical($authenticated->getPermissions(), array('migrate test authenticated permission', 'use text format filtered_html')); + $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(2))); $rid = 'migrate_test_role_1'; $migrate_test_role_1 = Role::load($rid); - $this->assertEqual($migrate_test_role_1->id(), $rid); - $this->assertEqual($migrate_test_role_1->getPermissions(), array(0 => 'migrate test role 1 test permission', 'use text format full_html')); - $this->assertEqual(array($rid), $migration->getIdMap()->lookupDestinationId(array(3))); + $this->assertIdentical($migrate_test_role_1->id(), $rid); + $this->assertIdentical($migrate_test_role_1->getPermissions(), array(0 => 'migrate test role 1 test permission', 'use text format full_html')); + $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(3))); $rid = 'migrate_test_role_2'; $migrate_test_role_2 = Role::load($rid); - $this->assertEqual($migrate_test_role_2->getPermissions(), array( + $this->assertIdentical($migrate_test_role_2->getPermissions(), array( 'migrate test role 2 test permission', 'use PHP for settings', 'administer contact forms', @@ -93,12 +93,12 @@ public function testUserRole() { 'administer nodes', 'access content overview', )); - $this->assertEqual($migrate_test_role_2->id(), $rid); - $this->assertEqual(array($rid), $migration->getIdMap()->lookupDestinationId(array(4))); + $this->assertIdentical($migrate_test_role_2->id(), $rid); + $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(4))); $rid = 'migrate_test_role_3_that_is_long'; $migrate_test_role_3 = Role::load($rid); - $this->assertEqual($migrate_test_role_3->id(), $rid); - $this->assertEqual(array($rid), $migration->getIdMap()->lookupDestinationId(array(5))); + $this->assertIdentical($migrate_test_role_3->id(), $rid); + $this->assertIdentical(array($rid), $migration->getIdMap()->lookupDestinationId(array(5))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php index 7ca1274ffbd5a8eabe0a478840c94efdc3e1e0d1..6f216cb1eb6f21c8258b4a05aff668c2a1e773ae 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateUserTest.php @@ -160,30 +160,30 @@ public function testUser() { $signature_format = $source->signature_format === '0' ? [NULL] : $migration_format->getIdMap()->lookupDestinationId(array($source->signature_format)); $user = User::load($source->uid); - $this->assertEqual($user->id(), $source->uid); - $this->assertEqual($user->label(), $source->name); - $this->assertEqual($user->getEmail(), $source->mail); - $this->assertEqual($user->getSignature(), $source->signature); + $this->assertIdentical($user->id(), $source->uid); + $this->assertIdentical($user->label(), $source->name); + $this->assertIdentical($user->getEmail(), $source->mail); + $this->assertIdentical($user->getSignature(), $source->signature); $this->assertIdentical($user->getSignatureFormat(), reset($signature_format)); - $this->assertEqual($user->getCreatedTime(), $source->created); - $this->assertEqual($user->getLastAccessedTime(), $source->access); - $this->assertEqual($user->getLastLoginTime(), $source->login); + $this->assertIdentical($user->getCreatedTime(), $source->created); + $this->assertIdentical($user->getLastAccessedTime(), $source->access); + $this->assertIdentical($user->getLastLoginTime(), $source->login); $is_blocked = $source->status == 0; - $this->assertEqual($user->isBlocked(), $is_blocked); + $this->assertIdentical($user->isBlocked(), $is_blocked); // $user->getPreferredLangcode() might fallback to default language if the // user preferred language is not configured on the site. We just want to // test if the value was imported correctly. - $this->assertEqual($user->preferred_langcode->value, $source->language); + $this->assertIdentical($user->preferred_langcode->value, $source->language); $time_zone = $source->expected_timezone ?: $this->config('system.date')->get('timezone.default'); - $this->assertEqual($user->getTimeZone(), $time_zone); - $this->assertEqual($user->getInitialEmail(), $source->init); - $this->assertEqual($user->getRoles(), $roles); + $this->assertIdentical($user->getTimeZone(), $time_zone); + $this->assertIdentical($user->getInitialEmail(), $source->init); + $this->assertIdentical($user->getRoles(), $roles); // We have one empty picture in the data so don't try load that. if (!empty($source->picture)) { // Test the user picture. $file = File::load($user->user_picture->target_id); - $this->assertEqual($file->getFilename(), basename($source->picture)); + $this->assertIdentical($file->getFilename(), basename($source->picture)); } // Use the UI to check if the password has been salted and re-hashed to diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateViewModesTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateViewModesTest.php index 4fa12826aec08679a78d0dffa90798cd7e5727a3..22ac840dc3a1f6d32707b1490721d2eca476f3d2 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateViewModesTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateViewModesTest.php @@ -49,10 +49,10 @@ protected function setUp() { public function testViewModes() { // Test a new view mode. $view_mode = EntityViewMode::load('node.preview'); - $this->assertEqual(is_null($view_mode), FALSE, 'Preview view mode loaded.'); - $this->assertEqual($view_mode->label(), 'Preview', 'View mode has correct label.'); + $this->assertIdentical(is_null($view_mode), FALSE, 'Preview view mode loaded.'); + $this->assertIdentical($view_mode->label(), 'Preview', 'View mode has correct label.'); // Test the Id Map. - $this->assertEqual(array('node', 'preview'), entity_load('migration', 'd6_view_modes')->getIdMap()->lookupDestinationID(array(1))); + $this->assertIdentical(array('node', 'preview'), entity_load('migration', 'd6_view_modes')->getIdMap()->lookupDestinationID(array(1))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityDisplayTest.php index 2bd19c6233e86afbf115c6f67b66e176e0d3601e..686529472fa3d5a4668b98ad552f25b85ca3ed9d 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityDisplayTest.php @@ -75,10 +75,10 @@ protected function setUp() { public function testVocabularyEntityDisplay() { // Test that the field exists. $component = entity_get_display('node', 'page', 'default')->getComponent('tags'); - $this->assertEqual($component['type'], 'taxonomy_term_reference_link'); - $this->assertEqual($component['weight'], 20); + $this->assertIdentical($component['type'], 'taxonomy_term_reference_link'); + $this->assertIdentical($component['weight'], 20); // Test the Id map. - $this->assertEqual(array('node', 'article', 'default', 'tags'), entity_load('migration', 'd6_vocabulary_entity_display')->getIdMap()->lookupDestinationID(array(4, 'article'))); + $this->assertIdentical(array('node', 'article', 'default', 'tags'), entity_load('migration', 'd6_vocabulary_entity_display')->getIdMap()->lookupDestinationID(array(4, 'article'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityFormDisplayTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityFormDisplayTest.php index 5d56c44422fce9f6133c5ce71c624b9d8a33136d..17878c30fad838ebd90e53419ab2ef7bd07f8b72 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityFormDisplayTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyEntityFormDisplayTest.php @@ -76,10 +76,10 @@ protected function setUp() { public function testVocabularyEntityFormDisplay() { // Test that the field exists. $component = entity_get_form_display('node', 'page', 'default')->getComponent('tags'); - $this->assertEqual($component['type'], 'options_select'); - $this->assertEqual($component['weight'], 20); + $this->assertIdentical($component['type'], 'options_select'); + $this->assertIdentical($component['weight'], 20); // Test the Id map. - $this->assertEqual(array('node', 'article', 'default', 'tags'), entity_load('migration', 'd6_vocabulary_entity_form_display')->getIdMap()->lookupDestinationID(array(4, 'article'))); + $this->assertIdentical(array('node', 'article', 'default', 'tags'), entity_load('migration', 'd6_vocabulary_entity_form_display')->getIdMap()->lookupDestinationID(array(4, 'article'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldInstanceTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldInstanceTest.php index ec7f221505e4c4ddf90cfd370ce4e22eb97663d1..dad53567af125f5f52cce411c4fcaa4bde571590 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldInstanceTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldInstanceTest.php @@ -86,14 +86,14 @@ public function testVocabularyFieldInstance() { // Test that the field exists. $field_id = 'node.article.tags'; $field = FieldConfig::load($field_id); - $this->assertEqual($field->id(), $field_id, 'Field instance exists on article bundle.'); + $this->assertIdentical($field->id(), $field_id, 'Field instance exists on article bundle.'); // Test the page bundle as well. $field_id = 'node.page.tags'; $field = FieldConfig::load($field_id); - $this->assertEqual($field->id(), $field_id, 'Field instance exists on page bundle.'); + $this->assertIdentical($field->id(), $field_id, 'Field instance exists on page bundle.'); - $this->assertEqual(array('node', 'article', 'tags'), entity_load('migration', 'd6_vocabulary_field_instance')->getIdMap()->lookupDestinationID(array(4, 'article'))); + $this->assertIdentical(array('node', 'article', 'tags'), entity_load('migration', 'd6_vocabulary_field_instance')->getIdMap()->lookupDestinationID(array(4, 'article'))); } } diff --git a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldTest.php index 7760d0eb72819277b6641b7ef34a3a03a45bec8a..ecae929575773254e8c77b88818a51def5b24bf4 100644 --- a/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateVocabularyFieldTest.php @@ -62,10 +62,10 @@ public function testVocabularyField() { // Test that the field exists. $field_storage_id = 'node.tags'; $field_storage = FieldStorageConfig::load($field_storage_id); - $this->assertEqual($field_storage->id(), $field_storage_id); + $this->assertIdentical($field_storage->id(), $field_storage_id); $settings = $field_storage->getSettings(); - $this->assertEqual('tags', $settings['allowed_values'][0]['vocabulary'], "Vocabulary has correct settings."); - $this->assertEqual(array('node', 'tags'), entity_load('migration', 'd6_vocabulary_field')->getIdMap()->lookupDestinationID(array(4)), "Test IdMap"); + $this->assertIdentical('tags', $settings['allowed_values'][0]['vocabulary'], "Vocabulary has correct settings."); + $this->assertIdentical(array('node', 'tags'), entity_load('migration', 'd6_vocabulary_field')->getIdMap()->lookupDestinationID(array(4)), "Test IdMap"); } } diff --git a/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php b/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php index 0e0193da9c3b9f63f728717892c714145eb7b1c3..244d609e4452f10c81a3eb20b08ea95815fe6c64 100644 --- a/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php +++ b/core/modules/migrate_drupal/src/Tests/dependencies/MigrateDependenciesTest.php @@ -29,7 +29,7 @@ public function testMigrateDependenciesOrder() { $migration_items = array('d6_comment', 'd6_filter_format', 'd6_node'); $migrations = entity_load_multiple('migration', $migration_items); $expected_order = array('d6_filter_format', 'd6_node', 'd6_comment'); - $this->assertEqual(array_keys($migrations), $expected_order); + $this->assertIdentical(array_keys($migrations), $expected_order); $expected_requirements = array( 'd6_node', 'd6_node_type', @@ -43,9 +43,9 @@ public function testMigrateDependenciesOrder() { // Migration dependencies for comment include dependencies for node // migration as well. $actual_requirements = $migrations['d6_comment']->get('requirements'); - $this->assertEqual(count($actual_requirements), count($expected_requirements)); + $this->assertIdentical(count($actual_requirements), count($expected_requirements)); foreach ($expected_requirements as $requirement) { - $this->assertEqual($actual_requirements[$requirement], $requirement); + $this->assertIdentical($actual_requirements[$requirement], $requirement); } } @@ -62,7 +62,7 @@ public function testAggregatorMigrateDependencies() { $executable = new MigrateExecutable($migration, $this); $this->startCollectingMessages(); $executable->import(); - $this->assertEqual($this->migrateMessages['error'], array(String::format('Migration @id did not meet the requirements. Missing migrations d6_aggregator_feed. requirements: d6_aggregator_feed.', array('@id' => $migration->id())))); + $this->assertIdentical($this->migrateMessages['error'], array(String::format('Migration @id did not meet the requirements. Missing migrations d6_aggregator_feed. requirements: d6_aggregator_feed.', array('@id' => $migration->id())))); $this->collectMessages = FALSE; }