function BlockContentTypeTest::testBlockContentAddPageOrder

Same name in other branches
  1. 9 core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php \Drupal\Tests\block_content\Functional\BlockContentTypeTest::testBlockContentAddPageOrder()
  2. 10 core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php \Drupal\Tests\block_content\Functional\BlockContentTypeTest::testBlockContentAddPageOrder()

Tests the order of the block content types on the add page.

File

core/modules/block_content/tests/src/Functional/BlockContentTypeTest.php, line 63

Class

BlockContentTypeTest
Ensures that block type functions work correctly.

Namespace

Drupal\Tests\block_content\Functional

Code

public function testBlockContentAddPageOrder() : void {
    $this->createBlockContentType([
        'id' => 'bundle_1',
        'label' => 'Bundle 1',
    ]);
    $this->createBlockContentType([
        'id' => 'bundle_2',
        'label' => 'Aaa Bundle 2',
    ]);
    $this->drupalLogin($this->adminUser);
    $this->drupalGet('block/add');
    $this->assertSession()
        ->pageTextMatches('/Aaa Bundle 2(.*)Bundle 1/');
}

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