 .../Unit/MigrateExecutableMemoryExceededTest.php   | 15 ++++----
 .../tests/src/Unit/MigrateExecutableTest.php       | 16 ++++++---
 .../migrate/tests/src/Unit/MigrateSourceTest.php   | 16 +++++----
 .../migrate/tests/src/Unit/MigrateSqlIdMapTest.php | 40 +++++++++++++++++++++-
 .../tests/src/Unit/MigrateSqlSourceTestCase.php    | 12 +++++--
 .../migrate/tests/src/Unit/MigrateTestCase.php     | 38 ++++++++++++++------
 .../tests/src/Unit/MigrationStorageTest.php        | 16 ++++++---
 .../migrate/tests/src/Unit/MigrationTest.php       | 36 +++++++++++++++++++
 .../modules/migrate/tests/src/Unit/SqlBaseTest.php | 35 ++++++++++++++++---
 .../tests/src/Unit/TestMigrateExecutable.php       |  6 ++--
 .../migrate/tests/src/Unit/TestSqlIdMap.php        | 17 +++++++++
 11 files changed, 204 insertions(+), 43 deletions(-)

diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php
index 477e890..d0c1604 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableMemoryExceededTest.php
@@ -42,13 +42,15 @@ class MigrateExecutableMemoryExceededTest extends MigrateTestCase {
    */
   protected $migrationConfiguration = array(
     'id' => 'test',
   );
 
   /**
-   * php.init memory_limit value.
+   * The php.ini memory_limit value.
+   *
+   * @var int
    */
   protected $memoryLimit = 10000000;
 
   /**
    * {@inheritdoc}
    */
@@ -65,18 +67,19 @@ protected function setUp() {
    * Runs the actual test.
    *
    * @param string $message
    *   The second message to assert.
    * @param bool $memory_exceeded
    *   Whether to test the memory exceeded case.
-   * @param int $memory_usage_first
-   *   (optional) The first memory usage value.
-   * @param int $memory_usage_second
+   * @param int|null $memory_usage_first
+   *   (optional) The first memory usage value. Defaults to NULL.
+   * @param int|null $memory_usage_second
    *   (optional) The fake amount of memory usage reported after memory reclaim.
-   * @param int $memory_limit
-   *   (optional) The memory limit.
+   *   Defaults to NULL.
+   * @param int|null $memory_limit
+   *   (optional) The memory limit. Defaults to NULL.
    */
   protected function runMemoryExceededTest($message, $memory_exceeded, $memory_usage_first = NULL, $memory_usage_second = NULL, $memory_limit = NULL) {
     $this->executable->setMemoryLimit($memory_limit ?: $this->memoryLimit);
     $this->executable->setMemoryUsage($memory_usage_first ?: $this->memoryLimit, $memory_usage_second ?: $this->memoryLimit);
     $this->executable->setMemoryThreshold(0.85);
     if ($message) {
diff --git a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
index 6e6ace5..86c37a3 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
@@ -37,12 +37,17 @@ class MigrateExecutableTest extends MigrateTestCase {
    * The tested migrate executable.
    *
    * @var \Drupal\Tests\migrate\Unit\TestMigrateExecutable
    */
   protected $executable;
 
+  /**
+   * The migration configuration values.
+   *
+   * @var array
+   */
   protected $migrationConfiguration = array(
     'id' => 'test',
   );
 
   /**
    * {@inheritdoc}
@@ -221,14 +226,15 @@ public function testImportWithValidRowNoDestinationValues() {
       ->with('New object was not saved, no error provided');
 
     $this->assertSame(MigrationInterface::RESULT_COMPLETED, $this->executable->import());
   }
 
   /**
-   * Tests the import method with a MigrateException being thrown from the
-   * destination.
+   * Tests the import method with a thrown MigrateException.
+   *
+   * The MigrateException in this case is being thrown from the destination.
    */
   public function testImportWithValidRowWithDestinationMigrateException() {
     $exception_message = $this->getRandomGenerator()->string();
     $source = $this->getMockSource();
 
     $row = $this->getMockBuilder('Drupal\migrate\Row')
@@ -272,14 +278,15 @@ public function testImportWithValidRowWithDestinationMigrateException() {
       ->will($this->returnValue(array('test')));
 
     $this->assertSame(MigrationInterface::RESULT_COMPLETED, $this->executable->import());
   }
 
   /**
-   * Tests the import method with a MigrateException being thrown from a process
-   * plugin.
+   * Tests the import method with a thrown MigrateException.
+   *
+   * The MigrateException in this case is being thrown from a process plugin.
    */
   public function testImportWithValidRowWithProcesMigrateException() {
     $exception_message = $this->getRandomGenerator()->string();
     $source = $this->getMockSource();
 
     $row = $this->getMockBuilder('Drupal\migrate\Row')
@@ -418,12 +425,13 @@ public function testProcessRowEmptyPipeline() {
   }
 
   /**
    * Returns a mock migration source instance.
    *
    * @return \Drupal\migrate\Plugin\MigrateSourceInterface|\PHPUnit_Framework_MockObject_MockObject
+   *   The mocked migration source.
    */
   protected function getMockSource() {
     $iterator = $this->getMock('\Iterator');
 
     $class = 'Drupal\migrate\Plugin\migrate\source\SourcePluginBase';
     $source = $this->getMockBuilder($class)
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php b/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
index 502c9e7..c071b15 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php
@@ -58,20 +58,22 @@ class MigrateSourceTest extends MigrateTestCase {
    *
    * @var \Drupal\migrate\MigrateExecutable
    */
   protected $executable;
 
   /**
-   * Get the source plugin to test.
+   * Gets the source plugin to test.
    *
    * @param array $configuration
-   *   The source configuration.
+   *   (optional) The source configuration. Defaults to an empty array.
    * @param array $migrate_config
-   *   The migration configuration to be used in parent::getMigration().
+   *   (optional) The migration configuration to be used in
+   *   parent::getMigration(). Defaults to an empty array.
    * @param int $status
-   *   The default status for the new rows to be imported.
+   *   (optional) The default status for the new rows to be imported. Defaults
+   *   to MigrateIdMapInterface::STATUS_NEEDS_UPDATE.
    *
    * @return \Drupal\migrate\Plugin\MigrateSourceInterface
    *   A mocked source plugin.
    */
   protected function getSource($configuration = [], $migrate_config = [], $status = MigrateIdMapInterface::STATUS_NEEDS_UPDATE) {
     $this->migrationConfiguration = $this->defaultMigrationConfiguration + $migrate_config;
@@ -364,13 +366,13 @@ public function testPrepareRowPrepareException() {
       ->willThrow($e)
       ->shouldBeCalled();
     $this->assertFalse($source->prepareRow($row));
   }
 
   /**
-   * Get a mock executable for the test.
+   * Gets a mock executable for the test.
    *
    * @param \Drupal\migrate\Entity\MigrationInterface $migration
    *   The migration entity.
    *
    * @return \Drupal\migrate\MigrateExecutable
    *   The migrate executable.
@@ -391,14 +393,15 @@ protected function getMigrateExecutable($migration) {
 class StubSourcePlugin extends SourcePluginBase {
 
   /**
    * Helper for setting internal module handler implementation.
    *
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
+   *   The module handler.
    */
-  function setModuleHandler(ModuleHandlerInterface $module_handler) {
+  public function setModuleHandler(ModuleHandlerInterface $module_handler) {
     $this->moduleHandler = $module_handler;
   }
 
   /**
    * {@inheritdoc}
    */
@@ -423,7 +426,8 @@ public function getIds() {
   /**
    * {@inheritdoc}
    */
   protected function initializeIterator() {
     return [];
   }
+
 }
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
index 0b61f30..3aebcd4 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
@@ -26,18 +26,28 @@ class MigrateSqlIdMapTest extends MigrateTestCase {
    * @var array
    */
   protected $migrationConfiguration = [
     'id' => 'sql_idmap_test',
   ];
 
+  /**
+   * The source IDs.
+   *
+   * @var array
+   */
   protected $sourceIds = [
     'source_id_property' => [
       'type' => 'string',
     ],
   ];
 
+  /**
+   * The destination IDs.
+   *
+   * @var array
+   */
   protected $destinationIds = [
     'destination_id_property' => [
       'type' => 'string',
     ],
   ];
 
@@ -45,21 +55,24 @@ class MigrateSqlIdMapTest extends MigrateTestCase {
    * The database connection.
    *
    * @var \Drupal\Core\Database\Connection
    */
   protected $database;
 
+  /**
+   * {@inheritdoc}
+   */
   public function setUp() {
     $this->database = $this->getDatabase([]);
   }
 
   /**
    * Saves a single ID mapping row in the database.
    *
    * @param array $map
-   *  The row to save.
+   *   The row to save.
    */
   protected function saveMap(array $map) {
     $table = 'migrate_map_sql_idmap_test';
 
     $schema = $this->database->schema();
     // If the table already exists, add any columns which are in the map array,
@@ -111,12 +124,15 @@ protected function getIdMap() {
 
     return $id_map;
   }
 
   /**
    * Sets defaults for SQL ID map plugin tests.
+   *
+   * @return array
+   *   An array of default values.
    */
   protected function idMapDefaults() {
     $defaults = array(
       'source_row_status' => MigrateIdMapInterface::STATUS_IMPORTED,
       'rollback_action' => MigrateIdMapInterface::ROLLBACK_DELETE,
       'hash' => '',
@@ -348,12 +364,15 @@ public function testGetRowBySource() {
    *
    * Scenarios to test (for both hits and misses) are:
    * - Single-value source ID to single-value destination ID.
    * - Multi-value source ID to multi-value destination ID.
    * - Single-value source ID to multi-value destination ID.
    * - Multi-value source ID to single-value destination ID.
+   *
+   * @return array
+   *   An array of data values.
    */
   public function lookupDestinationIdMappingDataProvider() {
     return [
       [1, 1],
       [2, 2],
       [1, 2],
@@ -365,12 +384,13 @@ public function lookupDestinationIdMappingDataProvider() {
    * Performs destination ID test on source and destination fields.
    *
    * @param int $num_source_fields
    *   Number of source fields to test.
    * @param int $num_destination_fields
    *   Number of destination fields to test.
+   *
    * @dataProvider lookupDestinationIdMappingDataProvider
    */
   public function testLookupDestinationIdMapping($num_source_fields, $num_destination_fields) {
     // Adjust the migration configuration according to the number of source and
     // destination fields.
     $this->sourceIds = [];
@@ -432,12 +452,15 @@ public function testGetRowByDestination() {
    *
    * Scenarios to test (for both hits and misses) are:
    * - Single-value destination ID to single-value source ID.
    * - Multi-value destination ID to multi-value source ID.
    * - Single-value destination ID to multi-value source ID.
    * - Multi-value destination ID to single-value source ID.
+   *
+   * @return array
+   *   An array of data values.
    */
   public function lookupSourceIDMappingDataProvider() {
     return [
       [1, 1],
       [2, 2],
       [1, 2],
@@ -449,12 +472,13 @@ public function lookupSourceIDMappingDataProvider() {
    * Performs the source ID test on source and destination fields.
    *
    * @param int $num_source_fields
    *   Number of source fields to test.
    * @param int $num_destination_fields
    *   Number of destination fields to test.
+   *
    * @dataProvider lookupSourceIDMappingDataProvider
    */
   public function testLookupSourceIDMapping($num_source_fields, $num_destination_fields) {
     // Adjust the migration configuration according to the number of source and
     // destination fields.
     $this->sourceIds = [];
@@ -553,12 +577,15 @@ public function testProcessedCount() {
    * Data provider for testUpdateCount().
    *
    * Scenarios to test for:
    * - No updates.
    * - One update.
    * - Multiple updates.
+   *
+   * @return array
+   *   An array of data values.
    */
   public function updateCountDataProvider() {
     return [
       [0],
       [1],
       [3],
@@ -567,12 +594,13 @@ public function updateCountDataProvider() {
 
   /**
    * Performs the update count test with a given number of update rows.
    *
    * @param int $num_update_rows
    *   The number of update rows to test.
+   *
    * @dataProvider updateCountDataProvider
    */
   public function testUpdateCount($num_update_rows) {
     for ($i = 0; $i < 5; $i++) {
       $row = $this->idMapDefaults();
       $row['sourceid1'] = "source_id_value_$i";
@@ -595,12 +623,15 @@ public function testUpdateCount($num_update_rows) {
    * Data provider for testErrorCount().
    *
    * Scenarios to test for:
    * - No errors.
    * - One error.
    * - Multiple errors.
+   *
+   * @return array
+   *   An array of data values.
    */
   public function errorCountDataProvider() {
     return [
       [0],
       [1],
       [3],
@@ -609,12 +640,13 @@ public function errorCountDataProvider() {
 
   /**
    * Performs error count test with a given number of error rows.
    *
    * @param int $num_error_rows
    *   Number of error rows to test.
+   *
    * @dataProvider errorCountDataProvider
    */
   public function testErrorCount($num_error_rows) {
     for ($i = 0; $i < 5; $i++) {
       $row = $this->idMapDefaults();
       $row['sourceid1'] = "source_id_value_$i";
@@ -786,12 +818,18 @@ public function testIterators() {
       $this->saveMap($row);
     }
 
     $this->assertSame(iterator_to_array($this->getIdMap()), $expected_results);
   }
 
+  /**
+   * Retrieves the contents of an ID map.
+   *
+   * @return array
+   *   The contents of an ID map.
+   */
   private function getIdMapContents() {
     $result = $this->database
       ->select('migrate_map_sql_idmap_test', 't')
       ->fields('t')
       ->execute();
 
diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlSourceTestCase.php b/core/modules/migrate/tests/src/Unit/MigrateSqlSourceTestCase.php
index f39a5ae..b933f79 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateSqlSourceTestCase.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateSqlSourceTestCase.php
@@ -108,39 +108,45 @@ protected function setUp() {
       ->will($this->returnValue($plugin));
     $this->source = $plugin;
     $this->expectedCount = count($this->expectedResults);
   }
 
   /**
-   * Test the source returns the same rows as expected.
+   * Tests that the source returns the same rows as expected.
    */
   public function testRetrieval() {
     $this->assertInstanceOf(SelectInterface::class, $this->source->query());
     $this->queryResultTest($this->source, $this->expectedResults);
   }
 
   /**
-   * Test the source returns the row count expected.
+   * Tests that the source returns the row count expected.
    */
   public function testSourceCount() {
     $count = $this->source->count();
     $this->assertTrue(is_numeric($count));
     $this->assertEquals($count, $this->expectedCount);
   }
 
   /**
-   * Test the source defines a valid ID.
+   * Tests the source defines a valid ID.
    */
   public function testSourceId() {
     $this->assertNotEmpty($this->source->getIds());
   }
 
   /**
+   * Gets the value on a row for a given key.
+   *
    * @param \Drupal\migrate\Row $row
+   *   The row identifier.
    * @param string $key
+   *   The key identifier.
+   *
    * @return mixed
+   *   The value on a row for a given key.
    */
   protected function getValue($row, $key) {
     return $row->getSourceProperty($key);
   }
 
 }
diff --git a/core/modules/migrate/tests/src/Unit/MigrateTestCase.php b/core/modules/migrate/tests/src/Unit/MigrateTestCase.php
index e3a253a..c9e4a97 100644
--- a/core/modules/migrate/tests/src/Unit/MigrateTestCase.php
+++ b/core/modules/migrate/tests/src/Unit/MigrateTestCase.php
@@ -14,28 +14,35 @@
 
 /**
  * Provides setup and helper methods for Migrate module tests.
  */
 abstract class MigrateTestCase extends UnitTestCase {
 
+  /**
+   * An array of migration configuration values.
+   *
+   * @var array
+   */
   protected $migrationConfiguration = [];
 
   /**
+   * The migration ID map.
+   *
    * @var \Drupal\migrate\Plugin\MigrateIdMapInterface|\PHPUnit_Framework_MockObject_MockObject
    */
   protected $idMap;
 
   /**
    * Local store for mocking setStatus()/getStatus().
    *
    * @var \Drupal\migrate\Entity\MigrationInterface::STATUS_*
    */
   protected $migrationStatus = MigrationInterface::STATUS_IDLE;
 
   /**
-   * Retrieve a mocked migration.
+   * Retrieves a mocked migration.
    *
    * @return \Drupal\migrate\Entity\MigrationInterface|\PHPUnit_Framework_MockObject_MockObject
    *   The mocked migration.
    */
   protected function getMigration() {
     $this->migrationConfiguration += ['migrationClass' => 'Drupal\migrate\Entity\Migration'];
@@ -80,29 +87,30 @@ protected function getMigration() {
       ->willReturnCallback(function ($argument) use (&$configuration) {
         return isset($configuration[$argument]) ? $configuration[$argument] : '';
       });
 
     $migration->method('set')
       ->willReturnCallback(function ($argument, $value) use (&$configuration) {
-      $configuration[$argument] = $value;
-    });
+        $configuration[$argument] = $value;
+      });
 
     $migration->method('id')
       ->willReturn($configuration['id']);
 
     return $migration;
   }
 
   /**
-   * Get an SQLite database connection object for use in tests.
+   * Gets an SQLite database connection object for use in tests.
    *
    * @param array $database_contents
    *   The database contents faked as an array. Each key is a table name, each
    *   value is a list of table rows, an associative array of field => value.
    * @param array $connection_options
-   *  (optional) Options for the database connection.
+   *   (optional) Options for the database connection. Defaults to an empty
+   *   array.
    *
    * @return \Drupal\Core\Database\Driver\sqlite\Connection
    *   The database connection.
    */
   protected function getDatabase(array $database_contents, $connection_options = []) {
     if (extension_loaded('pdo_sqlite')) {
@@ -133,29 +141,31 @@ protected function getDatabase(array $database_contents, $connection_options = [
   }
 
   /**
    * Generates a table schema from a row.
    *
    * @param array $row
-   *  The reference row on which to base the schema.
+   *   The reference row on which to base the schema.
    *
    * @return array
-   *  The Schema API-ready table schema.
+   *   The Schema API-ready table schema.
    */
   protected function createSchemaFromRow(array $row) {
-    // SQLite uses loose ("affinity") typing, so it's OK for every column
-    // to be a text field.
+    // SQLite uses loose ("affinity") typing, so it is OK for every column to be
+    // a text field.
     $fields = array_map(function() { return ['type' => 'text']; }, $row);
     return ['fields' => $fields];
   }
 
   /**
-   * Tests a query
+   * Tests a query.
    *
-   * @param array|\Traversable
+   * @param array|\Traversable $iter
    *   The countable. foreach-able actual results if a query is being run.
+   * @param array $expected_results
+   *   An array of expected results.
    */
   public function queryResultTest($iter, $expected_results) {
     $this->assertSame(count($expected_results), count($iter), 'Number of results match');
     $count = 0;
     foreach ($iter as $data_row) {
       $expected_row = $expected_results[$count];
@@ -165,15 +175,21 @@ public function queryResultTest($iter, $expected_results) {
       }
     }
     $this->assertSame(count($expected_results), $count);
   }
 
   /**
+   * Gets the value on a row for a given key.
+   *
    * @param array $row
+   *   The row information.
    * @param string $key
+   *   The key identifier.
+   *
    * @return mixed
+   *   The value on a row for a given key.
    */
   protected function getValue($row, $key) {
     return $row[$key];
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/MigrationStorageTest.php b/core/modules/migrate/tests/src/Unit/MigrationStorageTest.php
index 93cf301..097dfa6 100644
--- a/core/modules/migrate/tests/src/Unit/MigrationStorageTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrationStorageTest.php
@@ -20,17 +20,21 @@
  * @coversDefaultClass \Drupal\migrate\MigrationStorage
  * @group migrate
  */
 class MigrationStorageTest extends UnitTestCase {
 
   /**
+   * The migration storage.
+   *
    * @var \Drupal\Tests\migrate\Unit\TestMigrationStorage
    */
   protected $storage;
 
   /**
+   * The storage query.
+   *
    * @var \Drupal\Core\Entity\Query\QueryInterface|\PHPUnit_Framework_MockObject_MockObject
    */
   protected $query;
 
   /**
    * {@inheritdoc}
@@ -60,48 +64,50 @@ public function setUp() {
    */
   public function testGetVariantIdsWithVariants() {
     $this->query->method('execute')
       ->willReturn(['d6_node__page', 'd6_node__article']);
 
     $ids = $this->storage->getVariantIds(['d6_node:*', 'd6_user']);
-    $this->assertSame(['d6_node__page', 'd6_node__article', 'd6_user'],  $ids);
+    $this->assertSame(['d6_node__page', 'd6_node__article', 'd6_user'], $ids);
   }
 
   /**
    * Tests getVariantIds() when no variants exist.
    *
    * @covers ::getVariantIds
    */
   public function testGetVariantIdsNoVariants() {
     $this->query->method('execute')
       ->willReturn([]);
 
     $ids = $this->storage->getVariantIds(['d6_node:*', 'd6_user']);
-    $this->assertSame(['d6_user'],  $ids);
+    $this->assertSame(['d6_user'], $ids);
   }
 
   /**
-   * Tests getVariantIds() when no variants exist and there are no static
+   * Tests getVariantIds().
+   *
+   * This tests getVariantIds() when no variants exist and there are no static
    * (non-variant) dependencies.
    *
    * @covers ::getVariantIds
    */
   public function testGetVariantIdsNoVariantsOrStaticDependencies() {
     $this->query->method('execute')
       ->willReturn([]);
 
     $ids = $this->storage->getVariantIds(['d6_node:*', 'd6_node_revision:*']);
-    $this->assertSame([],  $ids);
+    $this->assertSame([], $ids);
   }
 
 }
 
 /**
  * Test version of \Drupal\migrate\MigrationStorage.
  *
- * Exposes protected methods for testing.
+ * This class exposes protected methods for testing.
  */
 class TestMigrationStorage extends MigrationStorage {
 
   /**
    * {@inheritdoc}
    */
diff --git a/core/modules/migrate/tests/src/Unit/MigrationTest.php b/core/modules/migrate/tests/src/Unit/MigrationTest.php
index 87f6c43..2693dec 100644
--- a/core/modules/migrate/tests/src/Unit/MigrationTest.php
+++ b/core/modules/migrate/tests/src/Unit/MigrationTest.php
@@ -117,32 +117,68 @@ public function testRequirementsForMigrations() {
 
     $migration->checkRequirements();
   }
 
 }
 
+/**
+ * Defines the TestMigration class.
+ */
 class TestMigration extends Migration {
 
+  /**
+   * Constructs an instance of TestMigration object.
+   */
   public function __construct() {
   }
 
+  /**
+   * Sets the requirements values.
+   *
+   * @param array $requirements
+   *   The array of requirement values.
+   */
   public function setRequirements(array $requirements) {
     $this->requirements = $requirements;
   }
 
+  /**
+   * Sets the source Plugin.
+   *
+   * @param \Drupal\migrate\Plugin\MigrateSourceInterface $source_plugin
+   *   The source Plugin.
+   */
   public function setSourcePlugin(MigrateSourceInterface $source_plugin) {
     $this->sourcePlugin = $source_plugin;
   }
 
+  /**
+   * Sets the destination Plugin.
+   *
+   * @param \Drupal\migrate\Plugin\MigrateDestinationInterface $destination_plugin
+   *   The destination Plugin.
+   */
   public function setDestinationPlugin(MigrateDestinationInterface $destination_plugin) {
     $this->destinationPlugin = $destination_plugin;
   }
 
+  /**
+   * Sets the entity manager service.
+   *
+   * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
+   *   The entity manager service.
+   */
   public function setEntityManager(EntityManagerInterface $entity_manager) {
     $this->entityManager = $entity_manager;
   }
 
 }
 
+/**
+ * Defines the RequirementsAwareSourceInterface.
+ */
 interface RequirementsAwareSourceInterface extends MigrateSourceInterface, RequirementsInterface {}
 
+/**
+ * Defines the RequirementsAwareDestinationInterface.
+ */
 interface RequirementsAwareDestinationInterface extends MigrateDestinationInterface, RequirementsInterface {}
diff --git a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
index caa6e3d..7e8960e 100644
--- a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
+++ b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php
@@ -15,22 +15,26 @@
  *
  * @group migrate
  */
 class SqlBaseTest extends UnitTestCase {
 
   /**
+   * Tests that the ID map is joinable.
+   *
    * @param bool $expected_result
    *   The expected result.
    * @param bool $id_map_is_sql
    *   TRUE if we want getIdMap() to return an instance of Sql.
    * @param bool $with_id_map
    *   TRUE if we want the id map to have a valid map of ids.
    * @param array $source_options
-   *   An array of connection options for the source connection.
+   *   (optional) An array of connection options for the source connection.
+   *   Defaults to an empty array.
    * @param array $idmap_options
-   *   An array of connection options for the id map connection.
+   *   (optional) An array of connection options for the id map connection.
+   *   Defaults to an empty array.
    *
    * @dataProvider sqlBaseTestProvider
    */
   public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map, $source_options = [], $idmap_options = []) {
     // Setup a connection object.
     $source_connection = $this->getMockBuilder('Drupal\Core\Database\Connection')
@@ -88,23 +92,43 @@ public function sqlBaseTestProvider() {
       // Source ids are empty so mapJoinable() is false.
       [FALSE, FALSE, FALSE],
       // Still false because getIdMap() is not a subclass of Sql.
       [FALSE, FALSE, TRUE],
       // Test mapJoinable() returns false when source and id connection options
       // differ.
-      [FALSE, TRUE, TRUE, ['username' => 'different_from_map', 'password' => 'different_from_map'], ['username' => 'different_from_source', 'password' => 'different_from_source']],
+      [FALSE, TRUE, TRUE,
+        ['username' => 'different_from_map', 'password' => 'different_from_map'],
+        ['username' => 'different_from_source', 'password' => 'different_from_source'],
+      ],
       // Returns true because source and id map connection options are the same.
-      [TRUE, TRUE, TRUE, ['username' => 'same_value', 'password' => 'same_value'], ['username' => 'same_value', 'password' => 'same_value']],
+      [TRUE, TRUE, TRUE,
+        ['username' => 'same_value', 'password' => 'same_value'],
+        ['username' => 'same_value', 'password' => 'same_value'],
+      ],
     ];
   }
 
 }
 
+/**
+ * Creates a base source class for SQL migration testing.
+ */
 class TestSqlBase extends SqlBase {
 
+  /**
+   * The database object.
+   *
+   * @var object
+   */
   protected $database;
+
+  /**
+   * The migration IDs.
+   *
+   * @var array
+   */
   protected $ids;
 
   /**
    * Override the constructor so we can create one easily.
    */
   public function __construct() {}
@@ -149,12 +173,15 @@ public function mapJoinable() {
   public function getIds() {
     return $this->ids;
   }
 
   /**
    * Allows us to set the ids during a test.
+   *
+   * @param array $ids
+   *   An array of identifier values.
    */
   public function setIds($ids) {
     $this->ids = $ids;
   }
 
   /**
diff --git a/core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php b/core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php
index 5aaeed5..086d351 100644
--- a/core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php
+++ b/core/modules/migrate/tests/src/Unit/TestMigrateExecutable.php
@@ -42,21 +42,21 @@ public function setStringTranslation(TranslationInterface $string_translation) {
   /**
    * Allows access to set protected source property.
    *
    * @param \Drupal\migrate\Plugin\MigrateSourceInterface $source
    *   The value to set.
    */
-  public function setSource($source) {
+  public function setSource(MigrateSourceInterface $source) {
     $this->source = $source;
   }
 
   /**
    * Allows access to protected sourceIdValues property.
    *
    * @param array $source_id_values
-   *   The value to set.
+   *   The values to set.
    */
   public function setSourceIdValues($source_id_values) {
     $this->sourceIdValues = $source_id_values;
   }
 
   /**
@@ -97,13 +97,13 @@ protected function getMemoryUsage() {
   /**
    * Sets the fake memory usage.
    *
    * @param int $memory_usage
    *   The fake memory usage value.
    * @param int $cleared_memory_usage
-   *   (optional) The fake cleared memory value.
+   *   (optional) The fake cleared memory value. Defaults to NULL.
    */
   public function setMemoryUsage($memory_usage, $cleared_memory_usage = NULL) {
     $this->memoryUsage = $memory_usage;
     $this->clearedMemoryUsage = $cleared_memory_usage;
   }
 
diff --git a/core/modules/migrate/tests/src/Unit/TestSqlIdMap.php b/core/modules/migrate/tests/src/Unit/TestSqlIdMap.php
index fa31689..de730f4 100644
--- a/core/modules/migrate/tests/src/Unit/TestSqlIdMap.php
+++ b/core/modules/migrate/tests/src/Unit/TestSqlIdMap.php
@@ -28,12 +28,14 @@ class TestSqlIdMap extends Sql implements \Iterator {
    * @param string $plugin_id
    *   The plugin ID for the migration process to do.
    * @param mixed $plugin_definition
    *   The configuration for the plugin.
    * @param \Drupal\migrate\Entity\MigrationInterface $migration
    *   The migration to do.
+   * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
+   *   The event dispatcher service.
    */
   public function __construct(Connection $database, array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, EventDispatcherInterface $event_dispatcher) {
     $this->database = $database;
     parent::__construct($configuration, $plugin_id, $plugin_definition, $migration, $event_dispatcher);
   }
 
@@ -41,27 +43,42 @@ public function __construct(Connection $database, array $configuration, $plugin_
    * {@inheritdoc}
    */
   public function getDatabase() {
     return parent::getDatabase();
   }
 
+  /**
+   * Gets the field schema.
+   *
+   * @param array $id_definition
+   *   An array defining the field, with a key 'type'.
+   *
+   * @return array
+   *   A field schema depending on value of key 'type'.  An empty array is
+   *   returned if 'type' is not defined.
+   *
+   * @throws \Drupal\migrate\MigrateException
+   */
   protected function getFieldSchema(array $id_definition) {
     if (!isset($id_definition['type'])) {
       return array();
     }
     switch ($id_definition['type']) {
       case 'integer':
         return array(
           'type' => 'int',
           'not null' => TRUE,
         );
+
       case 'string':
         return array(
           'type' => 'varchar',
           'length' => 255,
           'not null' => FALSE,
         );
+
       default:
         throw new MigrateException($id_definition['type'] . ' not supported');
     }
   }
+
 }
