Пример #1
0
 /**
  * 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();
 }
Пример #2
0
 public function test_assign_store_blocks()
 {
     $this->mockGenerator->orphanize('__construct');
     $this->mockGenerator->shuntParentClassCalls();
     $mockBlock = new \mock\Awakenweb\Livedocx\Block();
     $container = new LDXContainer();
     $container->assign($mockBlock);
     $this->array($container->getBlocks())->contains($mockBlock);
 }