function EntityFormTest::providerTestFormIds

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php \Drupal\Tests\Core\Entity\EntityFormTest::providerTestFormIds()
  2. 10 core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php \Drupal\Tests\Core\Entity\EntityFormTest::providerTestFormIds()
  3. 11.x core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php \Drupal\Tests\Core\Entity\EntityFormTest::providerTestFormIds()

Provides test data for testFormId().

File

core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php, line 75

Class

EntityFormTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Entity%21EntityForm.php/class/EntityForm/8.9.x" title="Base class for entity forms." class="local">\Drupal\Core\Entity\EntityForm</a> @group Entity

Namespace

Drupal\Tests\Core\Entity

Code

public function providerTestFormIds() {
    return [
        [
            'node_article_form',
            [
                'entity_type' => 'node',
                'bundle' => 'article',
                'operation' => 'default',
            ],
        ],
        [
            'node_article_delete_form',
            [
                'entity_type' => 'node',
                'bundle' => 'article',
                'operation' => 'delete',
            ],
        ],
        [
            'user_user_form',
            [
                'entity_type' => 'user',
                'bundle' => 'user',
                'operation' => 'default',
            ],
        ],
        [
            'user_form',
            [
                'entity_type' => 'user',
                'bundle' => '',
                'operation' => 'default',
            ],
        ],
        [
            'user_delete_form',
            [
                'entity_type' => 'user',
                'bundle' => '',
                'operation' => 'delete',
            ],
        ],
    ];
}

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