installEntitySchema('node'); $this->installConfig('node'); $this->configActionManager = $this->container->get('plugin.manager.config_action'); } /** * Tests the application of configuration actions on a node type. */ 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()); } }