flush() публичный Метод

This effectively synchronizes the in-memory state of managed objects with the filesystem.
public flush ( )
Пример #1
0
 public function testObjectFlushPerPersist()
 {
     for ($i = 1; $i <= 10; $i++) {
         $simple = new SimpleWithField();
         $simple->id = $i;
         $this->xem->persist($simple);
         $this->xem->flush();
         $filepath = __DIR__ . "/../Workspace/Doctrine/Tests/OXM/Entities/SimpleWithField/{$i}.xml";
         $this->assertFileExists($filepath);
         $this->assertXmlStringEqualsXmlFile($filepath, '<?xml version="1.0" encoding="UTF-8"?><simple-with-field id="' . $i . '"/>');
         unlink($filepath);
     }
 }