function EntityMaskTest::testIsNew
Same name in other branches
- 4.0.x modules/ctools_entity_mask/tests/src/Kernel/EntityMaskTest.php \Drupal\Tests\ctools_entity_mask\Kernel\EntityMaskTest::testIsNew()
Tests that mask entities' isNew() method behaves consistently.
File
-
modules/
ctools_entity_mask/ tests/ src/ Kernel/ EntityMaskTest.php, line 165
Class
- EntityMaskTest
- Basic test of entity type masking.
Namespace
Drupal\Tests\ctools_entity_mask\KernelCode
public function testIsNew() {
$block = BlockContent::create([
'type' => 'basic',
]);
$this->assertTrue($block->isNew());
$block->save();
$this->assertFalse($block->isNew());
}