diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
index 290160c..e76b455 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateDefaultLanguageTest.php
@@ -45,10 +45,10 @@ public function testMigrationWithNonExistentLanguage() {
     $count = 0;
     foreach ($messages as $message) {
       $count++;
-      $this->assertSame($message->message, "The language 'tv' does not exist on this site.");
-      $this->assertSame((int) $message->level, MigrationInterface::MESSAGE_ERROR);
+      $this->assertSame("The language 'tv' does not exist on this site.", $message->message);
+      $this->assertSame(MigrationInterface::MESSAGE_ERROR, (int) $message->level);
     }
-    $this->assertSame($count, 1);
+    $this->assertSame(1, $count);
   }
 
   /**
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
index 4a88427..96bc4a0 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageNegotiationSettingsTest.php
@@ -29,26 +29,26 @@ public function testLanguageNegotiationWithDefaultPathPrefix() {
     ]);
 
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_PATH_PREFIX);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_PATH_PREFIX, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
     $expected_prefixes = [
       'en' => '',
       'fr' => 'fr',
       'zu' => 'zu',
     ];
-    $this->assertSame($config->get('url.prefixes'), $expected_prefixes);
+    $this->assertSame($expected_prefixes, $config->get('url.prefixes'));
 
     $config = $this->config('language.types');
-    $this->assertSame($config->get('all'), ['language_interface', 'language_content', 'language_url']);
-    $this->assertSame($config->get('configurable'), ['language_interface']);
-    $this->assertSame($config->get('negotiation.language_content.enabled'), ['language-interface' => 0]);
-    $this->assertSame($config->get('negotiation.language_url.enabled'), ['language-url' => 0, 'language-url-fallback' => 1]);
+    $this->assertSame(['language_interface', 'language_content', 'language_url'], $config->get('all'));
+    $this->assertSame(['language_interface'], $config->get('configurable'));
+    $this->assertSame(['language-interface' => 0], $config->get('negotiation.language_content.enabled'));
+    $this->assertSame(['language-url' => 0, 'language-url-fallback' => 1], $config->get('negotiation.language_url.enabled'));
     $expected_language_interface = [
       'language-url' => 0,
       'language-selected' => 1,
     ];
-    $this->assertSame($config->get('negotiation.language_interface.enabled'), $expected_language_interface);
+    $this->assertSame($expected_language_interface, $config->get('negotiation.language_interface.enabled'));
   }
 
   /**
@@ -68,19 +68,19 @@ public function testLanguageNegotiationWithNoNegotiation() {
     ]);
 
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_PATH_PREFIX);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_PATH_PREFIX, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
 
     $config = $this->config('language.types');
-    $this->assertSame($config->get('all'), ['language_interface', 'language_content', 'language_url']);
-    $this->assertSame($config->get('configurable'), ['language_interface']);
-    $this->assertSame($config->get('negotiation.language_content.enabled'), ['language-interface' => 0]);
-    $this->assertSame($config->get('negotiation.language_url.enabled'), ['language-url' => 0, 'language-url-fallback' => 1]);
+    $this->assertSame(['language_interface', 'language_content', 'language_url'], $config->get('all'));
+    $this->assertSame(['language_interface'], $config->get('configurable'));
+    $this->assertSame(['language-interface' => 0], $config->get('negotiation.language_content.enabled'));
+    $this->assertSame(['language-url' => 0, 'language-url-fallback' => 1], $config->get('negotiation.language_url.enabled'));
     $expected_language_interface = [
       'language-selected' => 0,
     ];
-    $this->assertSame($config->get('negotiation.language_interface.enabled'), $expected_language_interface);
+    $this->assertSame($expected_language_interface, $config->get('negotiation.language_interface.enabled'));
   }
 
   /**
@@ -100,28 +100,28 @@ public function testLanguageNegotiationWithPathPrefix() {
     ]);
 
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_PATH_PREFIX);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_PATH_PREFIX, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
     $expected_prefixes = [
       'en' => '',
       'fr' => 'fr',
       'zu' => 'zu',
     ];
-    $this->assertSame($config->get('url.prefixes'), $expected_prefixes);
+    $this->assertSame($expected_prefixes, $config->get('url.prefixes'));
 
     $config = $this->config('language.types');
-    $this->assertSame($config->get('all'), ['language_interface', 'language_content', 'language_url']);
-    $this->assertSame($config->get('configurable'), ['language_interface']);
-    $this->assertSame($config->get('negotiation.language_content.enabled'), ['language-interface' => 0]);
-    $this->assertSame($config->get('negotiation.language_url.enabled'), ['language-url' => 0, 'language-url-fallback' => 1]);
+    $this->assertSame(['language_interface', 'language_content', 'language_url'], $config->get('all'));
+    $this->assertSame(['language_interface'], $config->get('configurable'));
+    $this->assertSame(['language-interface' => 0], $config->get('negotiation.language_content.enabled'));
+    $this->assertSame(['language-url' => 0, 'language-url-fallback' => 1], $config->get('negotiation.language_url.enabled'));
     $expected_language_interface = [
       'language-url' => 0,
       'language-user' => 1,
       'language-browser' => 2,
       'language-selected' => 3,
     ];
-    $this->assertSame($config->get('negotiation.language_interface.enabled'), $expected_language_interface);
+    $this->assertSame($expected_language_interface, $config->get('negotiation.language_interface.enabled'));
   }
 
   /**
@@ -142,26 +142,26 @@ public function testLanguageNegotiationWithDomain() {
 
     global $base_url;
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_DOMAIN);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_DOMAIN, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
     $expected_domains = [
       'en' => parse_url($base_url, PHP_URL_HOST),
       'fr' => 'fr.drupal.org',
       'zu' => 'zu.drupal.org',
     ];
-    $this->assertSame($config->get('url.domains'), $expected_domains);
+    $this->assertSame($expected_domains, $config->get('url.domains'));
 
     $config = $this->config('language.types');
-    $this->assertSame($config->get('all'), ['language_interface', 'language_content', 'language_url']);
-    $this->assertSame($config->get('configurable'), ['language_interface']);
-    $this->assertSame($config->get('negotiation.language_content.enabled'), ['language-interface' => 0]);
-    $this->assertSame($config->get('negotiation.language_url.enabled'), ['language-url' => 0, 'language-url-fallback' => 1]);
+    $this->assertSame(['language_interface', 'language_content', 'language_url'], $config->get('all'));
+    $this->assertSame(['language_interface'], $config->get('configurable'));
+    $this->assertSame(['language-interface' => 0], $config->get('negotiation.language_content.enabled'));
+    $this->assertSame(['language-url' => 0, 'language-url-fallback' => 1], $config->get('negotiation.language_url.enabled'));
     $expected_language_interface = [
       'language-url' => 0,
       'language-selected' => 1,
     ];
-    $this->assertSame($config->get('negotiation.language_interface.enabled'), $expected_language_interface);
+    $this->assertSame($expected_language_interface, $config->get('negotiation.language_interface.enabled'));
   }
 
 }
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
index ac7ca2e..2a11b25 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateDefaultLanguageTest.php
@@ -45,10 +45,10 @@ public function testMigrationWithNonExistentLanguage() {
     $count = 0;
     foreach ($messages as $message) {
       $count++;
-      $this->assertSame($message->message, "The language 'tv' does not exist on this site.");
-      $this->assertSame((int) $message->level, MigrationInterface::MESSAGE_ERROR);
+      $this->assertSame("The language 'tv' does not exist on this site.", $message->message);
+      $this->assertSame(MigrationInterface::MESSAGE_ERROR, (int) $message->level);
     }
-    $this->assertSame($count, 1);
+    $this->assertSame(1, $count);
   }
 
   /**
diff --git a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
index 09681de..fe6296c 100644
--- a/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
+++ b/core/modules/language/tests/src/Kernel/Migrate/d7/MigrateLanguageNegotiationSettingsTest.php
@@ -28,10 +28,10 @@ public function testLanguageTypes() {
     ]);
 
     $config = $this->config('language.types');
-    $this->assertSame($config->get('all'), ['language_content', 'language_url', 'language_interface']);
-    $this->assertSame($config->get('configurable'), ['language_interface']);
-    $this->assertSame($config->get('negotiation.language_content'), ['enabled' => ['language-interface' => 0]]);
-    $this->assertSame($config->get('negotiation.language_url'), ['enabled' => ['language-url' => 0, 'language-url-fallback' => 1]]);
+    $this->assertSame(['language_content', 'language_url', 'language_interface'], $config->get('all'));
+    $this->assertSame(['language_interface'], $config->get('configurable'));
+    $this->assertSame(['enabled' => ['language-interface' => 0]], $config->get('negotiation.language_content'));
+    $this->assertSame(['enabled' => ['language-url' => 0, 'language-url-fallback' => 1]], $config->get('negotiation.language_url'));
     $expected_language_interface = [
       'enabled' => [
         'language-url' => -9,
@@ -46,7 +46,7 @@ public function testLanguageTypes() {
         'language-selected' => -6,
       ],
     ];
-    $this->assertSame($config->get('negotiation.language_interface'), $expected_language_interface);
+    $this->assertSame($expected_language_interface, $config->get('negotiation.language_interface'));
   }
 
   /**
@@ -60,14 +60,14 @@ public function testLanguageNegotiationWithPrefix() {
     ]);
 
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_PATH_PREFIX);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_PATH_PREFIX, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
     $expected_prefixes = [
       'en' => '',
       'is' => 'is',
     ];
-    $this->assertSame($config->get('url.prefixes'), $expected_prefixes);
+    $this->assertSame($expected_prefixes, $config->get('url.prefixes'));
   }
 
   /**
@@ -87,14 +87,14 @@ public function testLanguageNegotiationWithDomain() {
 
     global $base_url;
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_DOMAIN);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_DOMAIN, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
     $expected_domains = [
       'en' => parse_url($base_url, PHP_URL_HOST),
       'is' => 'is.drupal.org',
     ];
-    $this->assertSame($config->get('url.domains'), $expected_domains);
+    $this->assertSame($expected_domains, $config->get('url.domains'));
   }
 
   /**
@@ -112,14 +112,14 @@ public function testLanguageNegotiationWithNonExistentVariables() {
     ]);
 
     $config = $this->config('language.negotiation');
-    $this->assertSame($config->get('session.parameter'), 'language');
-    $this->assertSame($config->get('url.source'), LanguageNegotiationUrl::CONFIG_PATH_PREFIX);
-    $this->assertSame($config->get('selected_langcode'), 'site_default');
+    $this->assertSame('language', $config->get('session.parameter'));
+    $this->assertSame(LanguageNegotiationUrl::CONFIG_PATH_PREFIX, $config->get('url.source'));
+    $this->assertSame('site_default', $config->get('selected_langcode'));
     $expected_prefixes = [
       'en' => '',
       'is' => 'is',
     ];
-    $this->assertSame($config->get('url.prefixes'), $expected_prefixes);
+    $this->assertSame($expected_prefixes, $config->get('url.prefixes'));
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php
index 321ca95..8837d5f 100644
--- a/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php
+++ b/core/modules/migrate/tests/src/Kernel/SqlBaseTest.php
@@ -47,8 +47,8 @@ public function testConnectionTypes() {
 
     // Verify that falling back to the default 'migrate' connection (defined in
     // the base class) works.
-    $this->assertSame($sql_base->getDatabase()->getTarget(), 'default');
-    $this->assertSame($sql_base->getDatabase()->getKey(), 'migrate');
+    $this->assertSame('default', $sql_base->getDatabase()->getTarget());
+    $this->assertSame('migrate', $sql_base->getDatabase()->getKey());
 
     // Verify the fallback state key overrides the 'migrate' connection.
     $target = 'test_fallback_target';
diff --git a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php
index 6deaec8..f450984 100644
--- a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityDisplayTest.php
@@ -44,8 +44,8 @@ public function testImport() {
       ->method('save')
       ->with();
     $plugin = new TestPerComponentEntityDisplay($entity);
-    $this->assertSame($plugin->import($row), ['entity_type_test', 'bundle_test', 'view_mode_test', 'field_name_test']);
-    $this->assertSame($plugin->getTestValues(), ['entity_type_test', 'bundle_test', 'view_mode_test']);
+    $this->assertSame(['entity_type_test', 'bundle_test', 'view_mode_test', 'field_name_test'], $plugin->import($row));
+    $this->assertSame(['entity_type_test', 'bundle_test', 'view_mode_test'], $plugin->getTestValues());
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php
index 0424ceb..157d45e 100644
--- a/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php
+++ b/core/modules/migrate/tests/src/Unit/destination/PerComponentEntityFormDisplayTest.php
@@ -44,8 +44,8 @@ public function testImport() {
       ->method('save')
       ->with();
     $plugin = new TestPerComponentEntityFormDisplay($entity);
-    $this->assertSame($plugin->import($row), ['entity_type_test', 'bundle_test', 'form_mode_test', 'field_name_test']);
-    $this->assertSame($plugin->getTestValues(), ['entity_type_test', 'bundle_test', 'form_mode_test']);
+    $this->assertSame(['entity_type_test', 'bundle_test', 'form_mode_test', 'field_name_test'], $plugin->import($row));
+    $this->assertSame(['entity_type_test', 'bundle_test', 'form_mode_test'], $plugin->getTestValues());
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php
index e3b8f27..91eb2e7 100644
--- a/core/modules/migrate/tests/src/Unit/process/CallbackTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/CallbackTest.php
@@ -30,7 +30,7 @@ protected function setUp() {
   public function testCallbackWithFunction() {
     $this->plugin->setCallable('strtolower');
     $value = $this->plugin->transform('FooBar', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'foobar');
+    $this->assertSame('foobar', $value);
   }
 
   /**
@@ -39,7 +39,7 @@ public function testCallbackWithFunction() {
   public function testCallbackWithClassMethod() {
     $this->plugin->setCallable(['\Drupal\Component\Utility\Unicode', 'strtolower']);
     $value = $this->plugin->transform('FooBar', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'foobar');
+    $this->assertSame('foobar', $value);
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php
index ea93e46..e7873fe 100644
--- a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php
@@ -30,7 +30,7 @@ protected function setUp() {
    */
   public function testConcatWithoutDelimiter() {
     $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'foobar');
+    $this->assertSame('foobar', $value);
   }
 
   /**
@@ -47,7 +47,7 @@ public function testConcatWithNonArray() {
   public function testConcatWithDelimiter() {
     $this->plugin->setDelimiter('_');
     $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'foo_bar');
+    $this->assertSame('foo_bar', $value);
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php
index 20bf3a0..466d002 100644
--- a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php
@@ -29,7 +29,7 @@ protected function setUp() {
    */
   public function testTransform() {
     $value = $this->plugin->transform('foo,bar,tik', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ['foo', 'bar', 'tik']);
+    $this->assertSame(['foo', 'bar', 'tik'], $value);
   }
 
   /**
@@ -38,7 +38,7 @@ public function testTransform() {
   public function testTransformLimit() {
     $plugin = new Explode(['delimiter' => '_', 'limit' => 2], 'map', []);
     $value = $plugin->transform('foo_bar_tik', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ['foo', 'bar_tik']);
+    $this->assertSame(['foo', 'bar_tik'], $value);
   }
 
   /**
@@ -49,7 +49,7 @@ public function testChainedTransform() {
 
     $concat = new Concat([], 'map', []);
     $concatenated = $concat->transform($exploded, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($concatenated, 'foobartik');
+    $this->assertSame('foobartik', $concatenated);
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php
index 14f3f9a..ad0a45a 100644
--- a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php
@@ -25,7 +25,7 @@ protected function setUp() {
    */
   public function testExtract() {
     $value = $this->plugin->transform(['foo' => 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'bar');
+    $this->assertSame('bar', $value);
   }
 
   /**
@@ -50,7 +50,7 @@ public function testExtractFail() {
   public function testExtractFailDefault() {
     $plugin = new Extract(['index' => ['foo'], 'default' => 'test'], 'map', []);
     $value = $plugin->transform(['bar' => 'foo'], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'test', '');
+    $this->assertSame('test', $value, '');
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php
index 73b20c2..496cf92 100644
--- a/core/modules/migrate/tests/src/Unit/process/FlattenTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/FlattenTest.php
@@ -17,7 +17,7 @@ class FlattenTest extends MigrateProcessTestCase {
   public function testFlatten() {
     $plugin = new Flatten([], 'flatten', []);
     $flattened = $plugin->transform([1, 2, [3, 4, [5]], [], [7, 8]], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($flattened, [1, 2, 3, 4, 5, 7, 8]);
+    $this->assertSame([1, 2, 3, 4, 5, 7, 8], $flattened);
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/process/GetTest.php b/core/modules/migrate/tests/src/Unit/process/GetTest.php
index 59ce8b6..5bc6247 100644
--- a/core/modules/migrate/tests/src/Unit/process/GetTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/GetTest.php
@@ -34,7 +34,7 @@ public function testTransformSourceString() {
       ->will($this->returnValue('source_value'));
     $this->plugin->setSource('test');
     $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'source_value');
+    $this->assertSame('source_value', $value);
   }
 
   /**
@@ -52,7 +52,7 @@ public function testTransformSourceArray() {
         return $map[$argument];
       }));
     $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ['source_value1', 'source_value2']);
+    $this->assertSame(['source_value1', 'source_value2'], $value);
   }
 
   /**
@@ -65,7 +65,7 @@ public function testTransformSourceStringAt() {
       ->will($this->returnValue('source_value'));
     $this->plugin->setSource('@@test');
     $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'source_value');
+    $this->assertSame('source_value', $value);
   }
 
   /**
@@ -85,7 +85,7 @@ public function testTransformSourceArrayAt() {
         return $map[$argument];
       }));
     $value = $this->plugin->transform(NULL, $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ['source_value1', 'source_value2', 'source_value3', 'source_value4']);
+    $this->assertSame(['source_value1', 'source_value2', 'source_value3', 'source_value4'], $value);
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/process/IteratorTest.php b/core/modules/migrate/tests/src/Unit/process/IteratorTest.php
index 46daade..dbf0c6b 100644
--- a/core/modules/migrate/tests/src/Unit/process/IteratorTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/IteratorTest.php
@@ -75,10 +75,10 @@ public function testIterator() {
     // values ended up in the proper destinations, and that the value of the
     // key (@id) is the same as the destination ID (42).
     $new_value = $plugin->transform($current_value, $migrate_executable, $row, 'test');
-    $this->assertSame(count($new_value), 1);
-    $this->assertSame(count($new_value[42]), 2);
-    $this->assertSame($new_value[42]['foo'], 'test');
-    $this->assertSame($new_value[42]['id'], 42);
+    $this->assertSame(1, count($new_value));
+    $this->assertSame(2, count($new_value[42]));
+    $this->assertSame('test', $new_value[42]['foo']);
+    $this->assertSame(42, $new_value[42]['id']);
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php
index 08fbef2..d409a88 100644
--- a/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/SkipOnEmptyTest.php
@@ -31,7 +31,7 @@ public function testProcessBypassesOnNonEmpty() {
     $configuration['method'] = 'process';
     $value = (new SkipOnEmpty($configuration, 'skip_on_empty', []))
       ->transform(' ', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ' ');
+    $this->assertSame(' ', $value);
   }
 
   /**
@@ -51,7 +51,7 @@ public function testRowBypassesOnNonEmpty() {
     $configuration['method'] = 'row';
     $value = (new SkipOnEmpty($configuration, 'skip_on_empty', []))
       ->transform(' ', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ' ');
+    $this->assertSame(' ', $value);
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php
index 714d5f7..91a0d2c 100644
--- a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php
@@ -27,7 +27,7 @@ protected function setUp() {
    */
   public function testMapWithSourceString() {
     $value = $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, ['bar' => 'baz']);
+    $this->assertSame(['bar' => 'baz'], $value);
   }
 
   /**
@@ -35,7 +35,7 @@ public function testMapWithSourceString() {
    */
   public function testMapWithSourceList() {
     $value = $this->plugin->transform(['foo', 'bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'baz');
+    $this->assertSame('baz', $value);
   }
 
   /**
@@ -62,7 +62,7 @@ public function testMapWithInvalidSourceWithADefaultValue() {
     $configuration['default_value'] = 'test';
     $this->plugin = new StaticMap($configuration, 'map', []);
     $value = $this->plugin->transform(['bar'], $this->migrateExecutable, $this->row, 'destinationproperty');
-    $this->assertSame($value, 'test');
+    $this->assertSame('test', $value);
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php b/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php
index dfcdec3..1d9061b 100644
--- a/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php
+++ b/core/modules/migrate/tests/src/Unit/process/SubProcessTest.php
@@ -73,10 +73,10 @@ public function testSubProcess() {
     // values ended up in the proper destinations, and that the value of the
     // key (@id) is the same as the destination ID (42).
     $new_value = $plugin->transform($current_value, $migrate_executable, $row, 'test');
-    $this->assertSame(count($new_value), 1);
-    $this->assertSame(count($new_value[42]), 2);
-    $this->assertSame($new_value[42]['foo'], 'test');
-    $this->assertSame($new_value[42]['id'], 42);
+    $this->assertSame(1, count($new_value));
+    $this->assertSame(2, count($new_value[42]));
+    $this->assertSame('test', $new_value[42]['foo']);
+    $this->assertSame(42, $new_value[42]['id']);
   }
 
 }
diff --git a/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php b/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php
index 1cbe8b4..a86ce6b 100644
--- a/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php
+++ b/core/modules/taxonomy/tests/src/Functional/Update/TaxonomyParentUpdateTest.php
@@ -65,23 +65,23 @@ public function testTaxonomyUpdateParents() {
     $term = Term::load(3);
     $this->assertCount(1, $term->parent);
     // Target ID is returned as string.
-    $this->assertSame((int) $term->get('parent')[0]->target_id, 0);
+    $this->assertSame(0, (int) $term->get('parent')[0]->target_id);
 
     // Test if the view has been converted to use the {taxonomy_term__parent}
     // table instead of the {taxonomy_term_hierarchy} table.
     $view = $this->config("views.view.test_taxonomy_parent");
 
     $relationship_base_path = 'display.default.display_options.relationships.parent';
-    $this->assertSame($view->get("$relationship_base_path.table"), 'taxonomy_term__parent');
-    $this->assertSame($view->get("$relationship_base_path.field"), 'parent_target_id');
+    $this->assertSame('taxonomy_term__parent', $view->get("$relationship_base_path.table"));
+    $this->assertSame('parent_target_id', $view->get("$relationship_base_path.field"));
 
     $filters_base_path_1 = 'display.default.display_options.filters.parent';
-    $this->assertSame($view->get("$filters_base_path_1.table"), 'taxonomy_term__parent');
-    $this->assertSame($view->get("$filters_base_path_1.field"), 'parent_target_id');
+    $this->assertSame('taxonomy_term__parent', $view->get("$filters_base_path_1.table"));
+    $this->assertSame('parent_target_id', $view->get("$filters_base_path_1.field"));
 
     $filters_base_path_2 = 'display.default.display_options.filters.parent';
-    $this->assertSame($view->get("$filters_base_path_2.table"), 'taxonomy_term__parent');
-    $this->assertSame($view->get("$filters_base_path_2.field"), 'parent_target_id');
+    $this->assertSame('taxonomy_term__parent', $view->get("$filters_base_path_2.table"));
+    $this->assertSame('parent_target_id', $view->get("$filters_base_path_2.field"));
 
     // The {taxonomy_term_hierarchy} table has been removed.
     $this->assertFalse($this->db->schema()->tableExists('taxonomy_term_hierarchy'));
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
index b449064..4f106da 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigFileContentTest.php
@@ -125,7 +125,7 @@ public function testReadWriteConfig() {
     $this->assertIdentical($config->get('null'), NULL);
 
     // Read false that had been nested in an array value.
-    $this->assertSame($config->get($casting_array_false_value_key), FALSE, "Nested boolean FALSE value returned FALSE.");
+    $this->assertSame(FALSE, $config->get($casting_array_false_value_key), "Nested boolean FALSE value returned FALSE.");
 
     // Unset a top level value.
     $config->clear($key);
diff --git a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
index 1ecd524..6e8042c 100644
--- a/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Path/PathValidatorTest.php
@@ -63,7 +63,7 @@ public function testGetUrlIfValidWithoutAccessCheck() {
       $url = $pathValidator->getUrlIfValidWithoutAccessCheck($entity->toUrl()->toString(TRUE)->getGeneratedUrl());
       $this->assertEquals($method, $requestContext->getMethod());
       $this->assertInstanceOf(Url::class, $url);
-      $this->assertSame($url->getRouteParameters(), ['entity_test' => $entity->id()]);
+      $this->assertSame(['entity_test' => $entity->id()], $url->getRouteParameters());
     }
   }
 
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php
index 46ef590..991006b 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/FileStorageReadOnlyTest.php
@@ -63,14 +63,14 @@ public function testReadOnly() {
     // Write out a PHP file and ensure it's successfully loaded.
     $code = "<?php\n\$GLOBALS[$random] = TRUE;";
     $success = $php->save($name, $code);
-    $this->assertSame($success, TRUE);
+    $this->assertSame(TRUE, $success);
     $php_read = new FileReadOnlyStorage($this->readonlyStorage);
     $php_read->load($name);
     $this->assertTrue($GLOBALS[$random]);
 
     // If the file was successfully loaded, it must also exist, but ensure the
     // exists() method returns that correctly.
-    $this->assertSame($php_read->exists($name), TRUE);
+    $this->assertSame(TRUE, $php_read->exists($name));
     // Saving and deleting should always fail.
     $this->assertFalse($php_read->save($name, $code));
     $this->assertFalse($php_read->delete($name));
diff --git a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
index e787510..38fcc60 100644
--- a/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
+++ b/core/tests/Drupal/Tests/Component/PhpStorage/MTimeProtectedFileStorageBase.php
@@ -89,8 +89,8 @@ public function testSecurity() {
     // minimal permissions. fileperms() can return high bits unrelated to
     // permissions, so mask with 0777.
     $this->assertTrue(file_exists($expected_filename));
-    $this->assertSame(fileperms($expected_filename) & 0777, 0444);
-    $this->assertSame(fileperms($expected_directory) & 0777, 0777);
+    $this->assertSame(0444, fileperms($expected_filename) & 0777);
+    $this->assertSame(0777, fileperms($expected_directory) & 0777);
 
     // Ensure the root directory for the bin has a .htaccess file denying web
     // access.
@@ -121,9 +121,9 @@ public function testSecurity() {
       chmod($expected_filename, 0400);
       chmod($expected_directory, 0100);
       $this->assertSame(file_get_contents($expected_filename), $untrusted_code);
-      $this->assertSame($php->exists($name), $this->expected[$i]);
-      $this->assertSame($php->load($name), $this->expected[$i]);
-      $this->assertSame($GLOBALS['hacked'], $this->expected[$i]);
+      $this->assertSame($this->expected[$i], $php->exists($name));
+      $this->assertSame($this->expected[$i], $php->load($name));
+      $this->assertSame($this->expected[$i], $GLOBALS['hacked']);
     }
     unset($GLOBALS['hacked']);
   }
diff --git a/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
index a3a32ad..d12ec61 100644
--- a/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
+++ b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php
@@ -58,7 +58,7 @@ protected function setUp() {
    */
   public function testEncodingAscii() {
     // Verify there aren't character encoding problems with the source string.
-    $this->assertSame(strlen($this->string), 127, 'A string with the full ASCII table has the correct length.');
+    $this->assertSame(127, strlen($this->string), 'A string with the full ASCII table has the correct length.');
     foreach ($this->htmlUnsafe as $char) {
       $this->assertTrue(strpos($this->string, $char) > 0, sprintf('A string with the full ASCII table includes %s.', $char));
     }
diff --git a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
index 2800c51..dc71bd4 100644
--- a/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
+++ b/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
@@ -182,7 +182,7 @@ public function testSafeInclude() {
     ]);
     $transliteration = new PhpTransliteration(vfsStream::url('transliteration/dir'));
     $transliterated = $transliteration->transliterate(chr(0xC2) . chr(0x82), '../index');
-    $this->assertSame($transliterated, 'safe');
+    $this->assertSame('safe', $transliterated);
   }
 
 }
diff --git a/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php b/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php
index 880aaec..cdc1c64 100644
--- a/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php
+++ b/core/tests/Drupal/Tests/Core/Ajax/AjaxResponseTest.php
@@ -52,9 +52,9 @@ public function testCommands() {
 
     // Ensure that the added commands are in the right order.
     $commands =& $this->ajaxResponse->getCommands();
-    $this->assertSame($commands[1], ['command' => 'one']);
-    $this->assertSame($commands[2], ['command' => 'two']);
-    $this->assertSame($commands[0], ['command' => 'three']);
+    $this->assertSame(['command' => 'one'], $commands[1]);
+    $this->assertSame(['command' => 'two'], $commands[2]);
+    $this->assertSame(['command' => 'three'], $commands[0]);
 
     // Remove one and change one element from commands and ensure the reference
     // worked as expected.
@@ -62,9 +62,9 @@ public function testCommands() {
     $commands[0]['class'] = 'test-class';
 
     $commands = $this->ajaxResponse->getCommands();
-    $this->assertSame($commands[1], ['command' => 'one']);
+    $this->assertSame(['command' => 'one'], $commands[1]);
     $this->assertFalse(isset($commands[2]));
-    $this->assertSame($commands[0], ['command' => 'three', 'class' => 'test-class']);
+    $this->assertSame(['command' => 'three', 'class' => 'test-class'], $commands[0]);
   }
 
   /**
diff --git a/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php b/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php
index b5e6bc8..badb981 100644
--- a/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php
+++ b/core/tests/Drupal/Tests/Core/Asset/CssCollectionGrouperUnitTest.php
@@ -104,52 +104,52 @@ public function testGrouper() {
 
     $groups = $this->grouper->group($css_assets);
 
-    $this->assertSame(count($groups), 5, "5 groups created.");
+    $this->assertSame(5, count($groups), "5 groups created.");
 
     // Check group 1.
     $group = $groups[0];
-    $this->assertSame($group['group'], -100);
-    $this->assertSame($group['type'], 'file');
-    $this->assertSame($group['media'], 'all');
-    $this->assertSame($group['preprocess'], TRUE);
-    $this->assertSame(count($group['items']), 3);
+    $this->assertSame(-100, $group['group']);
+    $this->assertSame('file', $group['type']);
+    $this->assertSame('all', $group['media']);
+    $this->assertSame(TRUE, $group['preprocess']);
+    $this->assertSame(3, count($group['items']));
     $this->assertContains($css_assets['system.base.css'], $group['items']);
     $this->assertContains($css_assets['js.module.css'], $group['items']);
 
     // Check group 2.
     $group = $groups[1];
-    $this->assertSame($group['group'], 0);
-    $this->assertSame($group['type'], 'file');
-    $this->assertSame($group['media'], 'all');
-    $this->assertSame($group['preprocess'], TRUE);
-    $this->assertSame(count($group['items']), 1);
+    $this->assertSame(0, $group['group']);
+    $this->assertSame('file', $group['type']);
+    $this->assertSame('all', $group['media']);
+    $this->assertSame(TRUE, $group['preprocess']);
+    $this->assertSame(1, count($group['items']));
     $this->assertContains($css_assets['field.css'], $group['items']);
 
     // Check group 3.
     $group = $groups[2];
-    $this->assertSame($group['group'], 0);
-    $this->assertSame($group['type'], 'external');
-    $this->assertSame($group['media'], 'all');
-    $this->assertSame($group['preprocess'], TRUE);
-    $this->assertSame(count($group['items']), 1);
+    $this->assertSame(0, $group['group']);
+    $this->assertSame('external', $group['type']);
+    $this->assertSame('all', $group['media']);
+    $this->assertSame(TRUE, $group['preprocess']);
+    $this->assertSame(1, count($group['items']));
     $this->assertContains($css_assets['external.css'], $group['items']);
 
     // Check group 4.
     $group = $groups[3];
-    $this->assertSame($group['group'], 100);
-    $this->assertSame($group['type'], 'file');
-    $this->assertSame($group['media'], 'all');
-    $this->assertSame($group['preprocess'], TRUE);
-    $this->assertSame(count($group['items']), 1);
+    $this->assertSame(100, $group['group']);
+    $this->assertSame('file', $group['type']);
+    $this->assertSame('all', $group['media']);
+    $this->assertSame(TRUE, $group['preprocess']);
+    $this->assertSame(1, count($group['items']));
     $this->assertContains($css_assets['elements.css'], $group['items']);
 
     // Check group 5.
     $group = $groups[4];
-    $this->assertSame($group['group'], 100);
-    $this->assertSame($group['type'], 'file');
-    $this->assertSame($group['media'], 'print');
-    $this->assertSame($group['preprocess'], TRUE);
-    $this->assertSame(count($group['items']), 1);
+    $this->assertSame(100, $group['group']);
+    $this->assertSame('file', $group['type']);
+    $this->assertSame('print', $group['media']);
+    $this->assertSame(TRUE, $group['preprocess']);
+    $this->assertSame(1, count($group['items']));
     $this->assertContains($css_assets['print.css'], $group['items']);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
index d06c678..00a5eb2 100644
--- a/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/AttributesTest.php
@@ -78,8 +78,8 @@ public function testAttributeValueBaseCopy() {
     $attributes['selected'] = $original_attributes['checked'];
     $attributes['id'] = $original_attributes['id'];
     $attributes = new Attribute($attributes);
-    $this->assertSame((string) $original_attributes, ' checked class="who is on" id="first"', 'Original boolean value used with original name.');
-    $this->assertSame((string) $attributes, ' selected id="first"', 'Original boolean value used with new name.');
+    $this->assertSame(' checked class="who is on" id="first"', (string) $original_attributes, 'Original boolean value used with original name.');
+    $this->assertSame(' selected id="first"', (string) $attributes, 'Original boolean value used with new name.');
   }
 
 }
diff --git a/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php b/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php
index 2493ab5..407fa5b 100644
--- a/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php
+++ b/core/tests/Drupal/Tests/Core/Common/DiffArrayTest.php
@@ -66,7 +66,7 @@ public function testDiffAssocRecursive() {
       'new' => 'new',
     ];
 
-    $this->assertSame(DiffArray::diffAssocRecursive($this->array1, $this->array2), $expected);
+    $this->assertSame($expected, DiffArray::diffAssocRecursive($this->array1, $this->array2));
   }
 
 }
diff --git a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php
index 9890ff9..017dedb 100644
--- a/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php
+++ b/core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/StackedKernelPassTest.php
@@ -51,12 +51,12 @@ public function testProcessWithStackedKernel() {
     $stacked_kernel_args = $this->containerBuilder->getDefinition('http_kernel')->getArguments();
 
     // Check the stacked kernel args.
-    $this->assertSame((string) $stacked_kernel_args[0], 'http_kernel.one');
+    $this->assertSame('http_kernel.one', (string) $stacked_kernel_args[0]);
     $this->assertCount(4, $stacked_kernel_args[1]);
-    $this->assertSame((string) $stacked_kernel_args[1][0], 'http_kernel.one');
-    $this->assertSame((string) $stacked_kernel_args[1][1], 'http_kernel.two');
-    $this->assertSame((string) $stacked_kernel_args[1][2], 'http_kernel.three');
-    $this->assertSame((string) $stacked_kernel_args[1][3], 'http_kernel.basic');
+    $this->assertSame('http_kernel.one', (string) $stacked_kernel_args[1][0]);
+    $this->assertSame('http_kernel.two', (string) $stacked_kernel_args[1][1]);
+    $this->assertSame('http_kernel.three', (string) $stacked_kernel_args[1][2]);
+    $this->assertSame('http_kernel.basic', (string) $stacked_kernel_args[1][3]);
 
     // Check the modified definitions.
     $definition = $this->containerBuilder->getDefinition('http_kernel.one');
diff --git a/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php b/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php
index d237ffa..a4e57ea 100644
--- a/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php
+++ b/core/tests/Drupal/Tests/Core/Password/PasswordHashingTest.php
@@ -96,7 +96,7 @@ public function testPasswordNeedsUpdate() {
    * @covers ::needsRehash
    */
   public function testPasswordHashing() {
-    $this->assertSame($this->passwordHasher->getCountLog2($this->hashedPassword), PhpassHashedPassword::MIN_HASH_COUNT, 'Hashed password has the minimum number of log2 iterations.');
+    $this->assertSame(PhpassHashedPassword::MIN_HASH_COUNT, $this->passwordHasher->getCountLog2($this->hashedPassword), 'Hashed password has the minimum number of log2 iterations.');
     $this->assertNotEquals($this->hashedPassword, $this->md5HashedPassword, 'Password hashes not the same.');
     $this->assertTrue($this->passwordHasher->check($this->password, $this->md5HashedPassword), 'Password check succeeds.');
     $this->assertTrue($this->passwordHasher->check($this->password, $this->hashedPassword), 'Password check succeeds.');
@@ -119,7 +119,7 @@ public function testPasswordRehashing() {
     $this->assertTrue($password_hasher->needsRehash($this->hashedPassword), 'Needs a new hash after incrementing the log2 count.');
     // Re-hash the password.
     $rehashed_password = $password_hasher->hash($this->password);
-    $this->assertSame($password_hasher->getCountLog2($rehashed_password), PhpassHashedPassword::MIN_HASH_COUNT + 1, 'Re-hashed password has the correct number of log2 iterations.');
+    $this->assertSame(PhpassHashedPassword::MIN_HASH_COUNT + 1, $password_hasher->getCountLog2($rehashed_password), 'Re-hashed password has the correct number of log2 iterations.');
     $this->assertNotEquals($rehashed_password, $this->hashedPassword, 'Password hash changed again.');
 
     // Now the hash should be OK.
diff --git a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
index db67ad7..1fa0dda 100644
--- a/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
+++ b/core/tests/Drupal/Tests/Core/Plugin/CategorizingPluginManagerTraitTest.php
@@ -47,10 +47,10 @@ protected function setUp() {
    * @covers ::getCategories
    */
   public function testGetCategories() {
-    $this->assertSame(array_values($this->pluginManager->getCategories()), [
+    $this->assertSame([
         'fruits',
         'vegetables',
-      ]);
+      ], array_values($this->pluginManager->getCategories()));
   }
 
   /**
@@ -58,7 +58,7 @@ public function testGetCategories() {
    */
   public function testGetSortedDefinitions() {
     $sorted = $this->pluginManager->getSortedDefinitions();
-    $this->assertSame(array_keys($sorted), ['apple', 'mango', 'cucumber']);
+    $this->assertSame(['apple', 'mango', 'cucumber'], array_keys($sorted));
   }
 
   /**
@@ -66,9 +66,9 @@ public function testGetSortedDefinitions() {
    */
   public function testGetGroupedDefinitions() {
     $grouped = $this->pluginManager->getGroupedDefinitions();
-    $this->assertSame(array_keys($grouped), ['fruits', 'vegetables']);
-    $this->assertSame(array_keys($grouped['fruits']), ['apple', 'mango']);
-    $this->assertSame(array_keys($grouped['vegetables']), ['cucumber']);
+    $this->assertSame(['fruits', 'vegetables'], array_keys($grouped));
+    $this->assertSame(['apple', 'mango'], array_keys($grouped['fruits']));
+    $this->assertSame(['cucumber'], array_keys($grouped['vegetables']));
   }
 
   /**
@@ -82,7 +82,7 @@ public function testProcessDefinitionCategory() {
       'category' => 'bag',
     ];
     $this->pluginManager->processDefinition($definition, 'some');
-    $this->assertSame($definition['category'], 'bag');
+    $this->assertSame('bag', $definition['category']);
 
     // No category, provider without label.
     $definition = [
@@ -90,7 +90,7 @@ public function testProcessDefinitionCategory() {
       'provider' => 'core',
     ];
     $this->pluginManager->processDefinition($definition, 'some');
-    $this->assertSame($definition['category'], 'core');
+    $this->assertSame('core', $definition['category']);
 
     // No category, provider is module with label.
     $definition = [
@@ -98,7 +98,7 @@ public function testProcessDefinitionCategory() {
       'provider' => 'node',
     ];
     $this->pluginManager->processDefinition($definition, 'some');
-    $this->assertSame($definition['category'], 'Node');
+    $this->assertSame('Node', $definition['category']);
   }
 
 }
diff --git a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
index 0ddae48..f8bba35 100644
--- a/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
+++ b/core/tests/Drupal/Tests/Core/Session/WriteSafeSessionHandlerTest.php
@@ -43,7 +43,7 @@ public function testConstructWriteSafeSessionHandlerDefaultArgs() {
     $session_id = 'some-id';
     $session_data = 'serialized-session-data';
 
-    $this->assertSame($this->sessionHandler->isSessionWritable(), TRUE);
+    $this->assertSame(TRUE, $this->sessionHandler->isSessionWritable());
 
     // Writing should be enabled, return value passed to the caller by default.
     $this->wrappedSessionHandler->expects($this->at(0))
@@ -57,10 +57,10 @@ public function testConstructWriteSafeSessionHandlerDefaultArgs() {
       ->will($this->returnValue(FALSE));
 
     $result = $this->sessionHandler->write($session_id, $session_data);
-    $this->assertSame($result, TRUE);
+    $this->assertSame(TRUE, $result);
 
     $result = $this->sessionHandler->write($session_id, $session_data);
-    $this->assertSame($result, FALSE);
+    $this->assertSame(FALSE, $result);
   }
 
   /**
@@ -77,10 +77,10 @@ public function testConstructWriteSafeSessionHandlerDisableWriting() {
     // Disable writing upon construction.
     $this->sessionHandler = new WriteSafeSessionHandler($this->wrappedSessionHandler, FALSE);
 
-    $this->assertSame($this->sessionHandler->isSessionWritable(), FALSE);
+    $this->assertSame(FALSE, $this->sessionHandler->isSessionWritable());
 
     $result = $this->sessionHandler->write($session_id, $session_data);
-    $this->assertSame($result, TRUE);
+    $this->assertSame(TRUE, $result);
   }
 
   /**
@@ -93,22 +93,22 @@ public function testSetSessionWritable() {
     $session_id = 'some-id';
     $session_data = 'serialized-session-data';
 
-    $this->assertSame($this->sessionHandler->isSessionWritable(), TRUE);
+    $this->assertSame(TRUE, $this->sessionHandler->isSessionWritable());
 
     // Disable writing after construction.
     $this->sessionHandler->setSessionWritable(FALSE);
-    $this->assertSame($this->sessionHandler->isSessionWritable(), FALSE);
+    $this->assertSame(FALSE, $this->sessionHandler->isSessionWritable());
 
     $this->sessionHandler = new WriteSafeSessionHandler($this->wrappedSessionHandler, FALSE);
 
-    $this->assertSame($this->sessionHandler->isSessionWritable(), FALSE);
+    $this->assertSame(FALSE, $this->sessionHandler->isSessionWritable());
 
     $result = $this->sessionHandler->write($session_id, $session_data);
-    $this->assertSame($result, TRUE);
+    $this->assertSame(TRUE, $result);
 
     // Enable writing again.
     $this->sessionHandler->setSessionWritable(TRUE);
-    $this->assertSame($this->sessionHandler->isSessionWritable(), TRUE);
+    $this->assertSame(TRUE, $this->sessionHandler->isSessionWritable());
 
     // Writing should be enabled, return value passed to the caller by default.
     $this->wrappedSessionHandler->expects($this->at(0))
@@ -122,10 +122,10 @@ public function testSetSessionWritable() {
       ->will($this->returnValue(FALSE));
 
     $result = $this->sessionHandler->write($session_id, $session_data);
-    $this->assertSame($result, TRUE);
+    $this->assertSame(TRUE, $result);
 
     $result = $this->sessionHandler->write($session_id, $session_data);
-    $this->assertSame($result, FALSE);
+    $this->assertSame(FALSE, $result);
   }
 
   /**
@@ -148,13 +148,13 @@ public function testOtherMethods($method, $expected_result, $args) {
     call_user_func_array([$invocation, 'with'], $args);
 
     // Test with writable session.
-    $this->assertSame($this->sessionHandler->isSessionWritable(), TRUE);
+    $this->assertSame(TRUE, $this->sessionHandler->isSessionWritable());
     $actual_result = call_user_func_array([$this->sessionHandler, $method], $args);
     $this->assertSame($expected_result, $actual_result);
 
     // Test with non-writable session.
     $this->sessionHandler->setSessionWritable(FALSE);
-    $this->assertSame($this->sessionHandler->isSessionWritable(), FALSE);
+    $this->assertSame(FALSE, $this->sessionHandler->isSessionWritable());
     $actual_result = call_user_func_array([$this->sessionHandler, $method], $args);
     $this->assertSame($expected_result, $actual_result);
   }
