diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php index 97b6002c75d..834edae9343 100644 --- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php +++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigrateFileTest.php @@ -33,7 +33,7 @@ class MigrateFileTest extends MigrateDrupal7TestBase { protected function getFileMigrationInfo() { return [ 'path' => 'public://sites/default/files/cube.jpeg', - 'size' => '3620', + 'size' => 3620, 'base_path' => 'public://', 'plugin_id' => 'd7_file', ]; diff --git a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php index 90c6b322ccd..5bf96455546 100644 --- a/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php +++ b/core/modules/file/tests/src/Kernel/Migrate/d7/MigratePrivateFileTest.php @@ -34,7 +34,7 @@ class MigratePrivateFileTest extends MigrateDrupal7TestBase { protected function getFileMigrationInfo() { return [ 'path' => 'private://sites/default/private/Babylon5.txt', - 'size' => '3', + 'size' => 3, 'base_path' => 'private://', 'plugin_id' => 'd7_file_private', ]; diff --git a/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php b/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php index 883b47fc088..2d0b9745001 100644 --- a/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php +++ b/core/modules/forum/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php @@ -31,11 +31,11 @@ class MigrateTaxonomyTermTranslationTest extends TaxonomyTermTranslationTest { */ public function testTaxonomyTermTranslation() { // Forums vocabulary, no multilingual option. - $this->assertEntity(1, 'en', 'General discussion', 'forums', NULL, NULL, '2', []); - $this->assertEntity(5, 'en', 'Custom Forum', 'forums', 'Where the cool kids are.', NULL, '3', []); - $this->assertEntity(6, 'en', 'Games', 'forums', NULL, NULL, '4', []); - $this->assertEntity(7, 'en', 'Minecraft', 'forums', NULL, NULL, '1', ['6']); - $this->assertEntity(8, 'en', 'Half Life 3', 'forums', NULL, NULL, '0', ['6']); + $this->assertEntity(1, 'en', 'General discussion', 'forums', NULL, NULL, 2, []); + $this->assertEntity(5, 'en', 'Custom Forum', 'forums', 'Where the cool kids are.', NULL, 3, []); + $this->assertEntity(6, 'en', 'Games', 'forums', NULL, NULL, 4, []); + $this->assertEntity(7, 'en', 'Minecraft', 'forums', NULL, NULL, 1, ['6']); + $this->assertEntity(8, 'en', 'Half Life 3', 'forums', NULL, NULL, 0, ['6']); } } diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php index eee1a0bd593..1f0c1fd6733 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php @@ -59,7 +59,7 @@ class FollowUpMigrationsTest extends MigrateDrupal7TestBase { protected function getFileMigrationInfo() { return [ 'path' => 'public://sites/default/files/cube.jpeg', - 'size' => '3620', + 'size' => 3620, 'base_path' => 'public://', 'plugin_id' => 'd7_file', ]; diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php index 6c967d33f95..31a2cb020a5 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php @@ -88,7 +88,7 @@ class MigrateNodeCompleteTest extends MigrateDrupal7TestBase { protected function getFileMigrationInfo() { return [ 'path' => 'public://sites/default/files/cube.jpeg', - 'size' => '3620', + 'size' => 3620, 'base_path' => 'public://', 'plugin_id' => 'd7_file', ]; diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php index b45fed75284..6c8d8e8151a 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeRevisionTest.php @@ -77,7 +77,7 @@ class MigrateNodeRevisionTest extends MigrateDrupal7TestBase { protected function getFileMigrationInfo() { return [ 'path' => 'public://sites/default/files/cube.jpeg', - 'size' => '3620', + 'size' => 3620, 'base_path' => 'public://', 'plugin_id' => 'd7_file', ]; diff --git a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php index 8245e832a62..55035a7419b 100644 --- a/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php +++ b/core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeTest.php @@ -74,7 +74,7 @@ class MigrateNodeTest extends MigrateDrupal7TestBase { protected function getFileMigrationInfo() { return [ 'path' => 'public://sites/default/files/cube.jpeg', - 'size' => '3620', + 'size' => 3620, 'base_path' => 'public://', 'plugin_id' => 'd7_file', ]; @@ -158,8 +158,8 @@ class MigrateNodeTest extends MigrateDrupal7TestBase { $this->assertSame(9, $results['node']); $this->assertSame(0, $results['node_complete']); - $this->assertEntity(1, 'test_content_type', 'en', 'An English Node', '2', TRUE, '1421727515', '1441032132', TRUE, FALSE); - $this->assertRevision(1, 'An English Node', '1', NULL, '1441032132'); + $this->assertEntity(1, 'test_content_type', 'en', 'An English Node', 2, TRUE, 1421727515, 1441032132, TRUE, FALSE); + $this->assertRevision(1, 'An English Node', 1, NULL, 1441032132); $node = Node::load(1); $this->assertNotEmpty($node->field_boolean->value); diff --git a/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php b/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php index c6cebd1201a..0bcb31667d5 100644 --- a/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php +++ b/core/modules/system/tests/src/Kernel/SecurityAdvisories/SecurityAdvisoriesFetcherTest.php @@ -507,7 +507,7 @@ class SecurityAdvisoriesFetcherTest extends KernelTestBase implements LoggerInte 'title' => 'SA title', 'link' => 'http://example.com', ]; - $responses[] = new Response('200', [], json_encode([$feed_item])); + $responses[] = new Response(200, [], json_encode([$feed_item])); } $this->setTestFeedResponses($responses); } @@ -634,8 +634,8 @@ class SecurityAdvisoriesFetcherTest extends KernelTestBase implements LoggerInte 'link' => 'http://example.com', ]; $this->setTestFeedResponses([ - new Response('500', [], 'HTTPS failed'), - new Response('200', [], json_encode([$feed_item])), + new Response(500, [], 'HTTPS failed'), + new Response(200, [], json_encode([$feed_item])), ]); $advisories = $this->getAdvisories(); @@ -667,7 +667,7 @@ class SecurityAdvisoriesFetcherTest extends KernelTestBase implements LoggerInte */ public function testNoHttpFallback(): void { $this->setTestFeedResponses([ - new Response('500', [], 'HTTPS failed'), + new Response(500, [], 'HTTPS failed'), ]); $exception_thrown = FALSE; diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php index a7f4ea69e86..bb2a789b853 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTest.php @@ -129,23 +129,23 @@ class MigrateTaxonomyTermTest extends MigrateDrupal7TestBase { $this->assertEntity(24, 'fr', 'FR - Crewman', 'vocabfixed', NULL, NULL, 0, [], NULL, NULL); // Localized. - $this->assertEntity(19, 'en', 'Jupiter Station', 'vocablocalized', 'Holographic research.', 'filtered_html', '0', []); - $this->assertEntity(20, 'en', 'DS9', 'vocablocalized', 'Terok Nor', 'filtered_html', '0', []); - $this->assertEntity(25, 'en', 'Emissary', 'vocablocalized2', 'Pilot episode', 'filtered_html', '0', []); + $this->assertEntity(19, 'en', 'Jupiter Station', 'vocablocalized', 'Holographic research.', 'filtered_html', 0, []); + $this->assertEntity(20, 'en', 'DS9', 'vocablocalized', 'Terok Nor', 'filtered_html', 0, []); + $this->assertEntity(25, 'en', 'Emissary', 'vocablocalized2', 'Pilot episode', 'filtered_html', 0, []); /** @var \Drupal\taxonomy\TermInterface $entity */ $entity = Term::load(20); $this->assertSame('Bajor', $entity->field_sector->value); // Translate. - $this->assertEntity(21, 'en', 'High council', 'vocabtranslate', NULL, NULL, '0', []); + $this->assertEntity(21, 'en', 'High council', 'vocabtranslate', NULL, NULL, 0, []); $entity = Term::load(21); $this->assertSame("K'mpec", $entity->field_chancellor->value); - $this->assertEntity(22, 'fr', 'fr - High council', 'vocabtranslate', NULL, NULL, '0', []); - $this->assertEntity(23, 'is', 'is - High council', 'vocabtranslate', NULL, NULL, '0', []); + $this->assertEntity(22, 'fr', 'fr - High council', 'vocabtranslate', NULL, NULL, 0, []); + $this->assertEntity(23, 'is', 'is - High council', 'vocabtranslate', NULL, NULL, 0, []); // Fixed. - $this->assertEntity(24, 'fr', 'FR - Crewman', 'vocabfixed', NULL, NULL, '0', []); + $this->assertEntity(24, 'fr', 'FR - Crewman', 'vocabfixed', NULL, NULL, 0, []); // Tests the migration of taxonomy term entity translations. $manager = $this->container->get('content_translation.manager'); diff --git a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php index 98137eb8a35..2164dafdbdc 100644 --- a/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/Migrate/d7/MigrateTaxonomyTermTranslationTest.php @@ -132,48 +132,48 @@ class MigrateTaxonomyTermTranslationTest extends MigrateDrupal7TestBase { */ public function testTaxonomyTermTranslation() { // Forums vocabulary, no multilingual option. - $this->assertEntity(1, 'en', 'General discussion', 'sujet_de_discussion', NULL, NULL, '2', []); - $this->assertEntity(5, 'en', 'Custom Forum', 'sujet_de_discussion', 'Where the cool kids are.', NULL, '3', []); - $this->assertEntity(6, 'en', 'Games', 'sujet_de_discussion', NULL, NULL, '4', []); - $this->assertEntity(7, 'en', 'Minecraft', 'sujet_de_discussion', NULL, NULL, '1', ['6']); - $this->assertEntity(8, 'en', 'Half Life 3', 'sujet_de_discussion', NULL, NULL, '0', ['6']); + $this->assertEntity(1, 'en', 'General discussion', 'sujet_de_discussion', NULL, NULL, 2, []); + $this->assertEntity(5, 'en', 'Custom Forum', 'sujet_de_discussion', 'Where the cool kids are.', NULL, 3, []); + $this->assertEntity(6, 'en', 'Games', 'sujet_de_discussion', NULL, NULL, 4, []); + $this->assertEntity(7, 'en', 'Minecraft', 'sujet_de_discussion', NULL, NULL, 1, ['6']); + $this->assertEntity(8, 'en', 'Half Life 3', 'sujet_de_discussion', NULL, NULL, 0, ['6']); // Test vocabulary, field translation. - $this->assertEntity(2, 'en', 'Term1 (This is a real field!)', 'test_vocabulary', 'The first term. (This is a real field!)', 'filtered_html', '0', []); - $this->assertEntity(3, 'en', 'Term2', 'test_vocabulary', 'The second term.', 'filtered_html', '0', []); - $this->assertEntity(4, 'en', 'Term3 in plain old English', 'test_vocabulary', 'The third term in plain old English.', 'full_html', '0', ['3']); + $this->assertEntity(2, 'en', 'Term1 (This is a real field!)', 'test_vocabulary', 'The first term. (This is a real field!)', 'filtered_html', 0, []); + $this->assertEntity(3, 'en', 'Term2', 'test_vocabulary', 'The second term.', 'filtered_html', 0, []); + $this->assertEntity(4, 'en', 'Term3 in plain old English', 'test_vocabulary', 'The third term in plain old English.', 'full_html', 0, ['3']); // Tags vocabulary, no multilingual option. - $this->assertEntity(9, 'en', 'Benjamin Sisko', 'tags', 'Portrayed by Avery Brooks', 'filtered_html', '0', []); - $this->assertEntity(10, 'en', 'Kira Nerys', 'tags', 'Portrayed by Nana Visitor', 'filtered_html', '0', []); - $this->assertEntity(11, 'en', 'Dax', 'tags', 'Portrayed by Terry Farrell', 'filtered_html', '0', []); - $this->assertEntity(12, 'en', 'Jake Sisko', 'tags', 'Portrayed by Cirroc Lofton', 'filtered_html', '0', []); - $this->assertEntity(13, 'en', 'Gul Dukat', 'tags', 'Portrayed by Marc Alaimo', 'filtered_html', '0', []); - $this->assertEntity(14, 'en', 'Odo', 'tags', 'Portrayed by Rene Auberjonois', 'filtered_html', '0', []); - $this->assertEntity(15, 'en', 'Worf', 'tags', 'Portrayed by Michael Dorn', 'filtered_html', '0', []); - $this->assertEntity(16, 'en', "Miles O'Brien", 'tags', 'Portrayed by Colm Meaney', 'filtered_html', '0', []); - $this->assertEntity(17, 'en', 'Quark', 'tags', 'Portrayed by Armin Shimerman', 'filtered_html', '0', []); - $this->assertEntity(18, 'en', 'Elim Garak', 'tags', 'Portrayed by Andrew Robinson', 'filtered_html', '0', []); + $this->assertEntity(9, 'en', 'Benjamin Sisko', 'tags', 'Portrayed by Avery Brooks', 'filtered_html', 0, []); + $this->assertEntity(10, 'en', 'Kira Nerys', 'tags', 'Portrayed by Nana Visitor', 'filtered_html', 0, []); + $this->assertEntity(11, 'en', 'Dax', 'tags', 'Portrayed by Terry Farrell', 'filtered_html', 0, []); + $this->assertEntity(12, 'en', 'Jake Sisko', 'tags', 'Portrayed by Cirroc Lofton', 'filtered_html', 0, []); + $this->assertEntity(13, 'en', 'Gul Dukat', 'tags', 'Portrayed by Marc Alaimo', 'filtered_html', 0, []); + $this->assertEntity(14, 'en', 'Odo', 'tags', 'Portrayed by Rene Auberjonois', 'filtered_html', 0, []); + $this->assertEntity(15, 'en', 'Worf', 'tags', 'Portrayed by Michael Dorn', 'filtered_html', 0, []); + $this->assertEntity(16, 'en', "Miles O'Brien", 'tags', 'Portrayed by Colm Meaney', 'filtered_html', 0, []); + $this->assertEntity(17, 'en', 'Quark', 'tags', 'Portrayed by Armin Shimerman', 'filtered_html', 0, []); + $this->assertEntity(18, 'en', 'Elim Garak', 'tags', 'Portrayed by Andrew Robinson', 'filtered_html', 0, []); // Localized. - $this->assertEntity(19, 'en', 'Jupiter Station', 'vocablocalized', 'Holographic research.', 'filtered_html', '0', []); - $this->assertEntity(20, 'en', 'DS9', 'vocablocalized', 'Terok Nor', 'filtered_html', '0', []); + $this->assertEntity(19, 'en', 'Jupiter Station', 'vocablocalized', 'Holographic research.', 'filtered_html', 0, []); + $this->assertEntity(20, 'en', 'DS9', 'vocablocalized', 'Terok Nor', 'filtered_html', 0, []); /** @var \Drupal\taxonomy\TermInterface $entity */ $entity = Term::load(20); $this->assertSame('Bajor', $entity->field_sector->value); // Translate. - $this->assertEntity(21, 'en', 'High council', 'vocabtranslate', NULL, NULL, '0', []); + $this->assertEntity(21, 'en', 'High council', 'vocabtranslate', NULL, NULL, 0, []); $entity = Term::load(21); $this->assertSame("K'mpec", $entity->field_chancellor->value); - $this->assertEntity(22, 'fr', 'fr - High council', 'vocabtranslate', NULL, NULL, '0', []); + $this->assertEntity(22, 'fr', 'fr - High council', 'vocabtranslate', NULL, NULL, 0, []); $entity = Term::load(22); $this->assertSame("fr - K'mpec", $entity->field_chancellor->value); - $this->assertEntity(23, 'is', 'is - High council', 'vocabtranslate', NULL, NULL, '0', []); + $this->assertEntity(23, 'is', 'is - High council', 'vocabtranslate', NULL, NULL, 0, []); // Fixed. - $this->assertEntity(24, 'fr', 'FR - Crewman', 'vocabfixed', NULL, NULL, '0', []); + $this->assertEntity(24, 'fr', 'FR - Crewman', 'vocabfixed', NULL, NULL, 0, []); $entity = Term::load(24); $this->assertSame('fr - specialist', $entity->field_training->value); } diff --git a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php index 7bc79978e63..b71277ba822 100644 --- a/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php +++ b/core/modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php @@ -110,7 +110,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], 'role_data' => [ 'anonymous' => [ - 'rid' => '1', + 'rid' => 1, 'valid' => [ 'access content', 'use text format filtered_html', @@ -120,7 +120,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'authenticated' => [ - 'rid' => '2', + 'rid' => 2, 'valid' => [ 'access content', 'use text format filtered_html', @@ -133,7 +133,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'migrate_test_role_1' => [ - 'rid' => '3', + 'rid' => 3, 'valid' => [ 'use text format full_html', 'use text format php_code', @@ -143,7 +143,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'migrate_test_role_2' => [ - 'rid' => '4', + 'rid' => 4, 'valid' => [ 'access content overview', 'administer nodes', @@ -166,7 +166,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'migrate_test_role_3_that_is_longer_than_thirty_two_characters' => [ - 'rid' => '5', + 'rid' => 5, 'valid' => [ 'use text format php_code', ], @@ -200,7 +200,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], 'role_data' => [ 'anonymous' => [ - 'rid' => '1', + 'rid' => 1, 'valid' => [ 'access content', 'use text format filtered_html', @@ -210,7 +210,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'authenticated' => [ - 'rid' => '2', + 'rid' => 2, 'valid' => [ 'access comments', 'access content', @@ -223,7 +223,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'migrate_test_role_1' => [ - 'rid' => '3', + 'rid' => 3, 'valid' => [ 'use text format full_html', 'use text format php_code', @@ -233,7 +233,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'migrate_test_role_2' => [ - 'rid' => '4', + 'rid' => 4, 'valid' => [ 'access content overview', 'administer contact forms', @@ -256,7 +256,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase { ], ], 'migrate_test_role_3_that_is_longer_than_thirty_two_characters' => [ - 'rid' => '5', + 'rid' => 5, 'valid' => [ 'use text format php_code', ], diff --git a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php index 83d880f9446..b74ca1f2043 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php @@ -62,7 +62,7 @@ class SelectComplexTest extends DatabaseTestBase { $result = $query->execute(); $num_records = 0; - $last_name = 0; + $last_name = '0'; // Verify that the results are returned in the correct order. foreach ($result as $record) {