You are here

public function UserProtectUnitTest::testPluginManager in User protect 8

@covers ::pluginManager

File

tests/src/Unit/UserProtectUnitTest.php, line 18

Class

UserProtectUnitTest
@coversDefaultClass \Drupal\userprotect\UserProtect @group userprotect

Namespace

Drupal\Tests\userprotect\Unit

Code

public function testPluginManager() {
  $container = new Container();
  $plugin_manager = $this
    ->createMock('\\Drupal\\Component\\Plugin\\PluginManagerInterface');
  $container
    ->set('plugin.manager.userprotect.user_protection', $plugin_manager);
  \Drupal::setContainer($container);
  $this
    ->assertSame($plugin_manager, UserProtect::pluginManager());
}