You are here

public function SchemaMetatagManagerTest::pivotData in Schema.org Metatag 8.2

Same name and namespace in other branches
  1. 8 tests/src/Unit/SchemaMetatagManagerTest.php \Drupal\Tests\schema_metatag\Unit\SchemaMetatagManagerTest::pivotData()

Provides pivot data.

Return value

array

  • name: name of the data set.

    • original: original data.
    • desired: desired result.

File

tests/src/Unit/SchemaMetatagManagerTest.php, line 110

Class

SchemaMetatagManagerTest
@coversDefaultClass \Drupal\schema_metatag\SchemaMetatagManager

Namespace

Drupal\Tests\schema_metatag\Unit

Code

public function pivotData() {
  $values = [
    'Simple pivot' => [
      [
        '@type' => 'Person',
        'name' => 'George',
        'Tags' => [
          'First',
          'Second',
          'Third',
        ],
      ],
      [
        0 => [
          '@type' => 'Person',
          'name' => 'George',
          'Tags' => 'First',
        ],
        1 => [
          '@type' => 'Person',
          'name' => 'George',
          'Tags' => 'Second',
        ],
        2 => [
          '@type' => 'Person',
          'name' => 'George',
          'Tags' => 'Third',
        ],
      ],
    ],
  ];
  return $values;
}