You are here

protected function OgGroupResolverTestBase::getPluginInstance in Organic groups 8

Returns an instance of the plugin under test.

Return value

\Drupal\og\OgGroupResolverInterface The plugin under test.

4 calls to OgGroupResolverTestBase::getPluginInstance()
OgGroupResolverTestBase::testStopPropagation in tests/src/Unit/Plugin/OgGroupResolver/OgGroupResolverTestBase.php
Tests if the plugin is able to stop the group resolving process.
OgRouteGroupResolverTestBase::testResolve in tests/src/Unit/Plugin/OgGroupResolver/OgRouteGroupResolverTestBase.php
@todo Update documentation.
RequestQueryArgumentResolverTest::testResolve in tests/src/Unit/Plugin/OgGroupResolver/RequestQueryArgumentResolverTest.php
@covers ::resolve @dataProvider resolveProvider
UserGroupAccessResolverTest::testResolve in tests/src/Unit/Plugin/OgGroupResolver/UserGroupAccessResolverTest.php
@covers ::resolve @dataProvider resolveProvider

File

tests/src/Unit/Plugin/OgGroupResolver/OgGroupResolverTestBase.php, line 169

Class

OgGroupResolverTestBase
Base class for testing OgGroupResolver plugins.

Namespace

Drupal\Tests\og\Unit\Plugin\OgGroupResolver

Code

protected function getPluginInstance() {
  $args = array_merge([
    [],
    $this->pluginId,
    [
      'id' => $this->pluginId,
      'class' => $this->className,
      'provider' => 'og',
    ],
  ], $this
    ->getInjectedDependencies());
  return new $this->className(...$args);
}