You are here

public function DeliveryCandidateTest::testAccountId in Message Subscribe 8

Test setting account ID.

@covers ::getAccountId @covers ::setAccountId

File

tests/src/Unit/Subscribers/DeliveryCandidateTest.php, line 77

Class

DeliveryCandidateTest
Unit tests for the delivery candidate class.

Namespace

Drupal\Tests\message_subscribe\Unit\Subscribers

Code

public function testAccountId() {
  $candidate = new DeliveryCandidate([], [], 42);
  $this
    ->assertEquals(42, $candidate
    ->getAccountId());
  $this
    ->assertInstanceOf(DeliveryCandidateInterface::class, $candidate
    ->setAccountId(123));
  $this
    ->assertEquals(123, $candidate
    ->getAccountId());
}