You are here

public function EntityQueueCrudTest::assetEntityQueue in Entityqueue 8

Verifies that entity queue is properly stored.

Parameters

\Drupal\entityqueue\Entity\EntityQueue $expected: Entity Queue.

1 call to EntityQueueCrudTest::assetEntityQueue()
EntityQueueCrudTest::testEntityQueueCrud in tests/src/Kernel/EntityQueueCrudTest.php
Tests CRUD operations for entity queue.

File

tests/src/Kernel/EntityQueueCrudTest.php, line 63

Class

EntityQueueCrudTest
Tests creation, loading, updating, deleting of entity queue.

Namespace

Drupal\Tests\entityqueue\Kernel

Code

public function assetEntityQueue(EntityQueue $expected) {
  $actual = EntityQueue::load($expected
    ->id());
  $this
    ->assertEquals($expected
    ->id(), $actual
    ->id());
  $this
    ->assertEquals($expected
    ->getTargetEntityTypeId(), $actual
    ->getTargetEntityTypeId());
  $this
    ->assertEquals($expected
    ->getHandler(), $actual
    ->getHandler());
  $this
    ->assertEquals($expected
    ->getEntitySettings(), $actual
    ->getEntitySettings());
  $this
    ->assertEquals($expected
    ->getQueueSettings(), $actual
    ->getQueueSettings());
  $this
    ->assertEquals($expected
    ->getMinimumSize(), $actual
    ->getMinimumSize());
  $this
    ->assertEquals($expected
    ->getMaximumSize(), $actual
    ->getMaximumSize());
  $this
    ->assertEquals($expected
    ->getActAsQueue(), $actual
    ->getActAsQueue());
  $this
    ->assertEquals($expected
    ->isReversed(), $actual
    ->isReversed());
  $this
    ->assertEquals($expected
    ->getHandlerPlugin(), $actual
    ->getHandlerPlugin());
  $this
    ->assertEquals($expected
    ->getPluginCollections(), $actual
    ->getPluginCollections());
}