You are here

public function PublishedFilterTest::filterTestProvider in Replication 8

Same name and namespace in other branches
  1. 8.2 tests/src/Kernel/Plugin/ReplicationFilter/PublishedFilterTest.php \Drupal\Tests\replication\Kernel\Plugin\ReplicationFilter\PublishedFilterTest::filterTestProvider()

Provide test cases for the "entity_type_id" and "bundle" parameters.

Note: the only node bundle is 'test' and the only block content bundle is 'test'.

Return value

array An array of arrays, each array being the arguments to filterTest().

File

tests/src/Kernel/Plugin/ReplicationFilter/PublishedFilterTest.php, line 108

Class

PublishedFilterTest
Tests that the published filter parses parameters correctly.

Namespace

Drupal\Tests\replication\Kernel\Plugin\ReplicationFilter

Code

public function filterTestProvider() {
  $published_node = [
    'type' => 'test',
    'status' => TRUE,
  ];
  $unpublished_node = [
    'type' => 'test',
    'status' => FALSE,
  ];
  $block = [
    'type' => 'test',
  ];
  return [
    [
      FALSE,
      'node',
      $published_node,
      TRUE,
    ],
    [
      FALSE,
      'node',
      $unpublished_node,
      FALSE,
    ],
    [
      TRUE,
      'block_content',
      $block,
      TRUE,
    ],
    [
      FALSE,
      'block_content',
      $block,
      FALSE,
    ],
  ];
}