/**
  * @covers ::isNew
  */
 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());
 }
Esempio n. 2
0
 /**
  * @covers ::isNew
  * @covers ::enforceIsNew
  */
 public function testIsNew()
 {
     // We provided an ID, so the entity is not new.
     $this->assertFalse($this->entity->isNew());
     // Force it to be new.
     $this->assertSame($this->entity, $this->entity->enforceIsNew());
     $this->assertTrue($this->entity->isNew());
 }