/** * Prepare the merging of the fields and return a document * * @param Container $container * * @return Document */ public function prepare() { $blocks = $this->container->getBlocks(); $fields = array_merge($this->container->getFields(), $this->container->getImages()); $this->declareListOfBlocks($blocks)->declareListOfValues($fields); return $this->createDocument(); }
public function test_assign_store_images() { $this->mockGenerator->orphanize('__construct'); $this->mockGenerator->shuntParentClassCalls(); $mockImage = new \mock\Awakenweb\Livedocx\Image(); $container = new LDXContainer(); $mockImage->getMockController()->getName = 'test'; $container->assign('testField', $mockImage); $this->array($container->getImages())->hasKey('image:testField')->contains('test'); }