public function export() { $root_node = $this->request->get('into_xml'); $plannings = $this->planning_factory->getOrderedPlanningsWithBacklogTracker($this->getCurrentUser(), $this->group_id); $xml_exporter = new AgileDashboard_XMLExporter(new XML_RNGValidator(), new PlanningPermissionsManager()); $xml_exporter->export($root_node, $plannings); }
public function itThrowsAnExceptionIfXmlGeneratedIsNotValid() { $xml_validator = stub('XML_RNGValidator')->validate()->throws(new XML_ParseException('', array(), array())); $exporter = new AgileDashboard_XMLExporter($xml_validator, $this->planning_permissions_manager); $this->expectException('XML_ParseException'); $exporter->export($this->xml_tree, $this->plannings); }