/**
  * Ensures that entities are detached only once, which means that the same entity
  * is not detached again on the next flush() call.
  */
 public function testOnceDetachedEntitiesAreNotDetachedAgainOnNextFlush()
 {
     $this->objectManager->expects($this->exactly(2))->method('detach')->with($this->isInstanceOf('\\stdClass'));
     $this->decorator->persist(new \stdClass());
     $this->decorator->persist(new \stdClass());
     $this->decorator->flush();
     $this->decorator->flush();
 }
Example #2
0
 /**
  * Forces a flush.
  */
 public function forceFlush()
 {
     if ($this->allowForceFlush) {
         if ($this->activateLog) {
             $this->log('Flush was forced for level ' . $this->flushSuiteLevel . '.');
         }
         parent::flush();
     }
 }
Example #3
0
 /**
  * Forces a flush.
  */
 public function forceFlush()
 {
     if ($this->allowForceFlush) {
         parent::flush();
     }
 }