You are here

protected function UpdatePublishedTest::setUp in Acquia Content Hub 8.2

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/EventSubscriber/HandleWebhook/UpdatePublishedTest.php, line 69

Class

UpdatePublishedTest
Tests entity updated published status.

Namespace

Drupal\Tests\acquia_contenthub\Kernel\EventSubscriber\HandleWebhook

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installSchema('acquia_contenthub_publisher', [
    'acquia_contenthub_publisher_export_tracking',
  ]);
  $this->configFactory = $this->container
    ->get('config.factory');
  $this
    ->createAcquiaContentHubAdminSettings();
  $this->clientFactory = $this->container
    ->get('acquia_contenthub.client.factory');

  // Create a test node.
  $this->node = Node::create([
    'type' => 'article',
    'title' => 'Test EN',
    'uuid' => '98213529-0000-0001-0000-123456789123',
  ]);
  $this->node
    ->save();
  $this->database = $this->container
    ->get('database');
  $this->updatePublished = new UpdatePublished($this->database);
}