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 97b6002c75d26a4846efe641482b1407f069c966..834edae93438158dd3ff5e1276171612e57f27a3 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 @@ protected function setUp(): void { 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 90c6b322ccd871c1f69b6e18f0009e7c225d914d..5bf96455546ab003e5f3cabdb532cd4a997520c2 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 @@ protected function setUp(): void { 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 883b47fc0885c1210511302929f42eb2474a262e..2d0b9745001507d49185dc6937eb8f4a1b11a1d0 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 @@ protected function getFixtureFilePath() { */ 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 eee1a0bd593efa88c93d85fe8003ea8cbc3672ca..1f0c1fd673364f071e32bdfe9c66b660de906f23 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 @@ protected function setUp(): void { 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 6c967d33f95fb76c1e6dca0cd3acdbe8ee331a1c..31a2cb020a5ec78768cf2d637437edc54ff282c9 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 @@ protected function setUp(): void { 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 b45fed752845eeda16112c7f2277f6dd8d1b0073..6c8d8e8151a5888ce33b2d596d5362762171cdcc 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 @@ protected function setUp(): void { 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 8245e832a6268671b2d98cf230fa813355c8f538..55035a7419b70bcedaab3e905632514d1175b8b2 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 @@ protected function setUp(): void { 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 @@ public function testNode() { $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 c6cebd1201a6bb90a3a9c54f009aac261c933420..0bcb31667d5f98e69deb8d3558ba380cfbdfb2de 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 @@ protected function setFeedItems(array $feed_items): void { '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 @@ public function testHttpFallback(): void { '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 @@ public function testHttpFallback(): void { */ 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 a7f4ea69e861d1e693a7474f80b4a7eb00a8ab9a..bb2a789b853135efc85d7980ef8f9f2b007e6dcf 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 @@ public function testTaxonomyTerms() { $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 98137eb8a359825d2f36af4d74a4443d43bc42fa..2164dafdbdc133a51c22ab5b59d598f71888b558 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 @@ protected function assertHierarchy(string $vid, int $tid, array $parent_ids): vo */ 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 7bc79978e6391e37f3941711b836b70d56d6ab08..b71277ba8227b9bab9f4e82cab42f9b3dca2af80 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 @@ public function providerTestUserRole() { ], 'role_data' => [ 'anonymous' => [ - 'rid' => '1', + 'rid' => 1, 'valid' => [ 'access content', 'use text format filtered_html', @@ -120,7 +120,7 @@ public function providerTestUserRole() { ], ], 'authenticated' => [ - 'rid' => '2', + 'rid' => 2, 'valid' => [ 'access content', 'use text format filtered_html', @@ -133,7 +133,7 @@ public function providerTestUserRole() { ], ], 'migrate_test_role_1' => [ - 'rid' => '3', + 'rid' => 3, 'valid' => [ 'use text format full_html', 'use text format php_code', @@ -143,7 +143,7 @@ public function providerTestUserRole() { ], ], 'migrate_test_role_2' => [ - 'rid' => '4', + 'rid' => 4, 'valid' => [ 'access content overview', 'administer nodes', @@ -166,7 +166,7 @@ public function providerTestUserRole() { ], ], '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 @@ public function providerTestUserRole() { ], 'role_data' => [ 'anonymous' => [ - 'rid' => '1', + 'rid' => 1, 'valid' => [ 'access content', 'use text format filtered_html', @@ -210,7 +210,7 @@ public function providerTestUserRole() { ], ], 'authenticated' => [ - 'rid' => '2', + 'rid' => 2, 'valid' => [ 'access comments', 'access content', @@ -223,7 +223,7 @@ public function providerTestUserRole() { ], ], 'migrate_test_role_1' => [ - 'rid' => '3', + 'rid' => 3, 'valid' => [ 'use text format full_html', 'use text format php_code', @@ -233,7 +233,7 @@ public function providerTestUserRole() { ], ], 'migrate_test_role_2' => [ - 'rid' => '4', + 'rid' => 4, 'valid' => [ 'access content overview', 'administer contact forms', @@ -256,7 +256,7 @@ public function providerTestUserRole() { ], ], '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 83d880f9446a75ec7ebdb81a6bb6e10c04ad6994..b74ca1f20438b04915113f5c6126c8b536e5ba85 100644 --- a/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php +++ b/core/tests/Drupal/KernelTests/Core/Database/SelectComplexTest.php @@ -62,7 +62,7 @@ public function testLeftOuterJoin() { $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) {