You are here

protected function PublisherSubscriberStatusCdfAttributeTest::setUp in Acquia Content Hub 8.2

Overrides UnitTestCase::setUp

File

tests/src/Unit/EventSubscriber/CdfAttributes/PublisherSubscriberStatusCdfAttributeTest.php, line 36

Class

PublisherSubscriberStatusCdfAttributeTest
Tests the PublisherSubscriberStatusCdfAttribute.

Namespace

Drupal\Tests\acquia_contenthub\Unit\EventSubscriber\CdfAttributes

Code

protected function setUp() {
  parent::setUp();
  $this->dispatcher = new EventDispatcher();
  $module_handler_service = $this
    ->getMockBuilder(ModuleHandler::class)
    ->disableOriginalConstructor()
    ->getMock();
  $checker = new PubSubModuleStatusChecker($module_handler_service);
  $this->dispatcher
    ->addSubscriber(new PublisherSubscriberStatusCdfAttribute($checker));
}