Ejemplo n.º 1
0
 /**
  * Handles POST requests for /project/{project_id}
  *
  * @return redirect
  */
 public function postProject($project_id)
 {
     if (!$this->checkNaming($this->input['table_name'])) {
         $response = ['error' => true, 'message' => 'Types may only contain lowercase a-z, underscores, & dashes.'];
     } else {
         ProjectType::createTypesGroup($project_id, $this->input['table_name']);
         $response = ['error' => false, 'message' => 'Created project type successfully.'];
     }
     return Redirect::back()->with($response);
 }
Ejemplo n.º 2
0
 /**
  * ProjectType::createTypesGroup()
  *
  * @expectedException Exception
  */
 public function testCreateTypesGroupException()
 {
     $this->setVars();
     ProjectType::createTypesGroup(83838, 'failure');
 }