function MigrateSourceTestBase::getPluginClass

Same name and namespace in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::getPluginClass()
  2. 8.9.x core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::getPluginClass()
  3. 10 core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php \Drupal\Tests\migrate\Kernel\MigrateSourceTestBase::getPluginClass()

Determines the plugin to be tested by reading the class @covers annotation.

Return value

string

1 call to MigrateSourceTestBase::getPluginClass()
MigrateSourceTestBase::getPlugin in core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
Instantiates the source plugin under test.

File

core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php, line 86

Class

MigrateSourceTestBase
Base class for tests of Migrate source plugins.

Namespace

Drupal\Tests\migrate\Kernel

Code

protected function getPluginClass() {
    $covers = $this->getTestClassCovers();
    if (!empty($covers)) {
        return $covers[0];
    }
    else {
        $this->fail('No plugin class was specified');
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.