function NodeLegacyTest::testNodeTypeIsNewRevision
Tests that NodeType::isNewRevision() triggers a deprecation error.
@expectedDeprecation NodeType::isNewRevision is deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. Use Drupal\Core\Entity\RevisionableEntityBundleInterface::shouldCreateNewRevision() instead. See https://www.drupal.org/node/3067365
File
-
core/
modules/ node/ tests/ src/ Kernel/ NodeLegacyTest.php, line 85
Class
- NodeLegacyTest
- Tests legacy user functionality.
Namespace
Drupal\Tests\node\KernelCode
public function testNodeTypeIsNewRevision() {
$type = NodeType::load('page');
$this->assertSame($type->shouldCreateNewRevision(), $type->isNewRevision());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.