You are here

public function UserProtectionBaseUnitTest::setUp in User protect 8

Overrides UnitTestCase::setUp

File

tests/src/Unit/Plugin/UserProtection/UserProtectionBaseUnitTest.php, line 43

Class

UserProtectionBaseUnitTest
@coversDefaultClass \Drupal\userprotect\Plugin\UserProtection\UserProtectionBase @group userprotect

Namespace

Drupal\Tests\userprotect\Unit\Plugin\UserProtection

Code

public function setUp() {
  parent::setUp();
  $this->moduleHandler = $this
    ->createMock('\\Drupal\\Core\\Extension\\ModuleHandlerInterface');
  $this->plugin = $this
    ->getMockBuilder('\\Drupal\\userprotect\\Plugin\\UserProtection\\UserProtectionBase')
    ->setConstructorArgs([
    [],
    '',
    $this->pluginDefinition,
    $this->moduleHandler,
  ])
    ->setMethods([
    't',
  ])
    ->getMock();
  $this->plugin
    ->expects($this
    ->any())
    ->method('t')
    ->will($this
    ->returnArgument(0));
}