/** * @test */ public function flushTheData() { $chunk = new XMLChunk(); $chunk->page = 3; $chunk->section = 4; $chunk->xml = '<foot/>'; $this->obj->save($chunk); $chunks = $this->obj->find(); $this->assertInternalType('array', $chunks); $this->assertSame(1, count($chunks)); $this->obj->flush(); $chunks = $this->obj->find(); $this->assertInternalType('array', $chunks); $this->assertSame(0, count($chunks)); }
/** * {@inheritDoc} */ protected function preProcessAction() { $this->volumeGateway->flush($this->setup); $this->sectionGateway->flush($this->setup); $this->pageGateway->flush($this->setup); $this->xmlChunkGateway->flush($this->setup); }