function ConfigActionsTest::testConfigActions
Same name in this branch
- 11.x core/modules/media/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\media\Kernel\ConfigActionsTest::testConfigActions()
- 11.x core/modules/language/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\language\Kernel\ConfigActionsTest::testConfigActions()
- 11.x core/modules/field/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\field\Kernel\ConfigActionsTest::testConfigActions()
- 11.x core/modules/contact/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\contact\Kernel\ConfigActionsTest::testConfigActions()
- 11.x core/modules/image/tests/src/Kernel/ConfigActionsTest.php \Drupal\Tests\image\Kernel\ConfigActionsTest::testConfigActions()
File
-
core/
modules/ node/ tests/ src/ Kernel/ ConfigActionsTest.php, line 35
Class
- ConfigActionsTest
- @group node
Namespace
Drupal\Tests\node\KernelCode
public function testConfigActions() : void {
$node_type = $this->createContentType();
$this->assertTrue($node_type->shouldCreateNewRevision());
$this->assertSame(DRUPAL_OPTIONAL, $node_type->getPreviewMode());
$this->assertTrue($node_type->displaySubmitted());
$this->configActionManager
->applyAction('entity_method:node.type:setNewRevision', $node_type->getConfigDependencyName(), FALSE);
$this->configActionManager
->applyAction('entity_method:node.type:setPreviewMode', $node_type->getConfigDependencyName(), DRUPAL_REQUIRED);
$this->configActionManager
->applyAction('entity_method:node.type:setDisplaySubmitted', $node_type->getConfigDependencyName(), FALSE);
$node_type = NodeType::load($node_type->id());
$this->assertFalse($node_type->shouldCreateNewRevision());
$this->assertSame(DRUPAL_REQUIRED, $node_type->getPreviewMode());
$this->assertFalse($node_type->displaySubmitted());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.