public function testUpdateWithNastyRequestShouldThrowErrors() { $this->request->set('children', array('DROP DATABASE http://xkcd.com/327/')); $this->dao->expectNever('updateChildren'); $this->expectFeedback('error', '*'); $this->expectRedirectTo($this->redirect_url); $controller = new Tracker_Hierarchy_Controller($this->request, $this->hierarchical_tracker, $this->factory, $this->dao); $controller->update(); }
public function itCreatesHierarchyFromXmlProjectImportProcess() { $mapping = array(111, 222, 333, 444); $controller = new Tracker_Hierarchy_Controller($this->request, $this->hierarchical_tracker, $this->factory, $this->dao); $this->dao->expectCallCount('updateChildren', 1); $controller->updateFromXmlProjectImportProcess($mapping); }