You are here

public function OnlyOneModuleHandlerTest::providerGetModuleHelpPageLink in Allow a content type only once (Only One) 8

Data provider for testGetModuleHelpPageLink().

Return value

array An array of arrays, each containing:

  • 'expected' - Expected return from existsNodesContentType().
  • 'module_machine_name' - The module machine name.
  • 'module_name_alternate' - Alternate module name.
  • 'emphasize' - Boolean for wrap with <em> tags the module name.

See also

testExistsNodesContentType()

File

tests/src/Unit/OnlyOneModuleHandlerTest.php, line 145

Class

OnlyOneModuleHandlerTest
Tests the OnlyOneModuleHandler class methods.

Namespace

Drupal\Tests\onlyone\Unit

Code

public function providerGetModuleHelpPageLink() {
  $tests = [
    // No existing modules.
    [
      '<em>Action</em>',
      'action',
      'Action',
      TRUE,
    ],
    [
      'Asana Module',
      'asana',
      'Asana Module',
      FALSE,
    ],
    [
      'Webform',
      'webform',
      'Webform',
    ],
    // Existing installed modules.
    [
      'Admin Toolbar',
      'admin_toolbar',
      'Admin Toolbar',
      TRUE,
    ],
    [
      'Modules Weight',
      'modules_weight',
      'Modules Weight',
    ],
    [
      'No Autocomplete',
      'no_autocomplete',
      'No Autocomplete',
      FALSE,
    ],
    // Existing not installed modules.
    [
      '<em>Node</em>',
      'node',
      'Node Module',
      TRUE,
    ],
    [
      'Views',
      'views',
      'Views Module',
      FALSE,
    ],
    [
      'Workflows',
      'workflows',
      'Workflows Module',
    ],
  ];
  return $tests;
}