function StateFormatterTest::formatterTestCases

Same name in other branches
  1. 9 core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php \Drupal\Tests\content_moderation\Kernel\StateFormatterTest::formatterTestCases()
  2. 10 core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php \Drupal\Tests\content_moderation\Kernel\StateFormatterTest::formatterTestCases()
  3. 11.x core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php \Drupal\Tests\content_moderation\Kernel\StateFormatterTest::formatterTestCases()

Test cases for ::

File

core/modules/content_moderation/tests/src/Kernel/StateFormatterTest.php, line 67

Class

StateFormatterTest
Test the state field formatter.

Namespace

Drupal\Tests\content_moderation\Kernel

Code

public function formatterTestCases() {
    return [
        'Draft State' => [
            'draft',
            [
                'type' => 'content_moderation_state',
                'settings' => [],
            ],
            [
                '#markup' => 'Draft',
            ],
        ],
        'Published State' => [
            'published',
            [
                'type' => 'content_moderation_state',
                'settings' => [],
            ],
            [
                '#markup' => 'Published',
            ],
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.