You are here

public function ModerationDeriverTest::getDerivativeDefinitionsProvider in Workbench Moderation to Content Moderation 8.2

Data provider for testGetDerivativeDefinitions().

Return value

array A set of test scenarios. Each is an array with the following items:

  • A set of arrays, each representing an entity type, and keyed by the entity type ID. Each array is a tuple of three boolean flags representing (in order) the revisionablity and translatability of the entity type. See mockEntityType() for more info.
  • How many plugin definitions the deriver is expected to return.
  • The derivative IDs that the deriver is expected to return.

File

tests/src/Unit/Plugin/Deriver/ModerationDeriverTest.php, line 94

Class

ModerationDeriverTest
@coversDefaultClass \Drupal\wbm2cm\Plugin\Deriver\ModerationDeriver @group wbm2cm

Namespace

Drupal\Tests\wbm2cm\Unit\Plugin\Deriver

Code

public function getDerivativeDefinitionsProvider() {
  return [
    'revisionable and translatable' => [
      [
        'foo' => [
          TRUE,
          TRUE,
        ],
      ],
      1,
      [
        'foo',
      ],
    ],
    'translatable but not revisionable' => [
      [
        'foo' => [
          TRUE,
          TRUE,
        ],
        'bar' => [
          FALSE,
          TRUE,
        ],
      ],
      1,
      [
        'foo',
      ],
    ],
    'revisionable but not translatable' => [
      [
        'foo' => [
          TRUE,
          TRUE,
        ],
        'bar' => [
          TRUE,
          FALSE,
        ],
      ],
      1,
      [
        'foo',
      ],
    ],
  ];
}