public function ConfigEntityBaseUnitTest::testIsNew in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest::testIsNew()
@covers ::isNew
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ Entity/ ConfigEntityBaseUnitTest.php, line 411 - Contains \Drupal\Tests\Core\Config\Entity\ConfigEntityBaseUnitTest.
Class
- ConfigEntityBaseUnitTest
- @coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityBase @group Config
Namespace
Drupal\Tests\Core\Config\EntityCode
public function testIsNew() {
$this
->assertFalse($this->entity
->isNew());
$this
->assertSame($this->entity, $this->entity
->enforceIsNew());
$this
->assertTrue($this->entity
->isNew());
$this->entity
->enforceIsNew(FALSE);
$this
->assertFalse($this->entity
->isNew());
}