You are here

public function NodeRevisionDeleteTest::providerGetContentTypeConfig in Node Revision Delete 8

Data provider for testGetContentTypeConfig.

Return value

array An array of arrays, each containing:

  • 'expected' - Expected return from getTimeString().
  • 'third_party_settings' - The content type third party settings.
  • 'content_type' - Content type machine name.

See also

testGetTimeString()

File

tests/src/Unit/NodeRevisionDeleteTest.php, line 900

Class

NodeRevisionDeleteTest
Tests the NodeRevisionDelete class methods.

Namespace

Drupal\Tests\node_revision_delete\Unit

Code

public function providerGetContentTypeConfig() {
  $content_types = [
    'article',
    'page',
    'test',
    'car',
    'house',
  ];
  $third_party_settings = [
    [
      'node_revision_delete' => [
        0,
      ],
    ],
    [
      'xxx' => [
        0,
      ],
    ],
    [
      'xxx' => [
        1,
      ],
    ],
    [
      'node_revision_delete' => [
        1,
      ],
    ],
    [
      'node_revision_delete' => [
        2,
      ],
    ],
  ];
  $expected = [
    [
      0,
    ],
    [],
    [],
    [
      1,
    ],
    [
      2,
    ],
  ];
  $tests = [];
  $tests[] = [
    $expected[0],
    $third_party_settings[0],
    $content_types[0],
  ];
  $tests[] = [
    $expected[1],
    $third_party_settings[1],
    $content_types[1],
  ];
  $tests[] = [
    $expected[2],
    $third_party_settings[2],
    $content_types[2],
  ];
  $tests[] = [
    $expected[3],
    $third_party_settings[3],
    $content_types[3],
  ];
  $tests[] = [
    $expected[4],
    $third_party_settings[4],
    $content_types[4],
  ];
  return $tests;
}