function NodeCreationTest::testNodeAddPageOrder
Same name in other branches
- 10 core/modules/node/tests/src/Functional/NodeCreationTest.php \Drupal\Tests\node\Functional\NodeCreationTest::testNodeAddPageOrder()
- 11.x core/modules/node/tests/src/Functional/NodeCreationTest.php \Drupal\Tests\node\Functional\NodeCreationTest::testNodeAddPageOrder()
Tests the order of the node types on the add page.
File
-
core/
modules/ node/ tests/ src/ Functional/ NodeCreationTest.php, line 54
Class
- NodeCreationTest
- Create a node and test saving it.
Namespace
Drupal\Tests\node\FunctionalCode
public function testNodeAddPageOrder() {
$this->createContentType([
'type' => 'bundle_1',
'name' => 'Bundle 1',
]);
$this->createContentType([
'type' => 'bundle_2',
'name' => 'Aaa Bundle 2',
]);
$admin_content_types = $this->drupalCreateUser([
'bypass node access',
]);
$this->drupalLogin($admin_content_types);
$this->drupalGet('node/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.