You are here

public function OnlyOneAdminToolbarTest::setUp in Allow a content type only once (Only One) 8

Overrides UnitTestCase::setUp

File

modules/onlyone_admin_toolbar/tests/src/Unit/OnlyOneAdminToolbarTest.php, line 41

Class

OnlyOneAdminToolbarTest
Tests the Language class methods.

Namespace

Drupal\Tests\onlyone_admin_toolbar\Unit

Code

public function setUp() {
  parent::setUp();

  // Config factory mock.
  $this->configFactory = $this
    ->createMock('Drupal\\Core\\Config\\ConfigFactoryInterface');

  // Route builder mock.
  $this->routeBuilder = $this
    ->createMock('Drupal\\Core\\Routing\\RouteBuilderInterface');

  // Creating the object.
  $this->onlyOneAdminToolbar = new OnlyOneAdminToolbar($this->configFactory, $this->routeBuilder);
}