You are here

public function FeedAccessControlHandlerTest::setUp in Feeds 8.3

Overrides FeedsUnitTestCase::setUp

File

tests/src/Unit/FeedAccessControlHandlerTest.php, line 38

Class

FeedAccessControlHandlerTest
@coversDefaultClass \Drupal\feeds\FeedAccessControlHandler @group feeds

Namespace

Drupal\Tests\feeds\Unit

Code

public function setUp() {
  parent::setUp();
  $this->entityType = $this
    ->createMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
  $this->entityType
    ->expects($this
    ->once())
    ->method('id')
    ->will($this
    ->returnValue('feeds_feed'));
  $this->controller = new FeedAccessControlHandler($this->entityType);
  $this->moduleHandler = $this
    ->createMock('\\Drupal\\Core\\Extension\\ModuleHandlerInterface');
  $this->moduleHandler
    ->expects($this
    ->any())
    ->method('invokeAll')
    ->will($this
    ->returnValue([]));
  $this->controller
    ->setModuleHandler($this->moduleHandler);
}