public function setup()
 {
     $this->prophet = new \Prophecy\Prophet();
     $this->settings = new Settings();
     $this->content = new Exporter_Content(1, 'My Title', '<p>Hello, World!</p>', null, null, 'Author Name');
     $this->styles = new Component_Text_Styles($this->content, $this->settings);
     $this->layouts = new Component_Layouts($this->content, $this->settings);
     $workspace = $this->prophet->prophesize('\\Exporter\\Workspace');
     Component_Factory::initialize($workspace, $this->settings, $this->styles, $this->layouts);
 }
示例#2
0
 /**
  * Get a component from a node.
  *
  * @param DomNode $node
  * @return Component
  * @access private
  */
 private function get_components_from_node($node)
 {
     return Component_Factory::get_components_from_node($node);
 }