Ejemplo n.º 1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $measures = Measure::orderBy('name')->get();
     $specimentypes = SpecimenType::orderBy('name')->get();
     $testcategories = TestCategory::lists('name', 'id');
     $measuretype = MeasureType::all()->sortBy('id');
     $organisms = Organism::orderBy('name')->get();
     //Create TestType
     return view('testtype.create', compact('testcategories', 'measures', 'measuretype', 'specimentypes', 'organisms'));
 }
Ejemplo n.º 2
0
 /**
  * Tests the update funtion in the MeasureController
  * 
  * @return void
  */
 public function testIfDeleteWorks()
 {
     //Save again because teardown() dropped the db :(
     $this->runStore($this->inputNumeric);
     $measurestored = Measure::orderBy('id', 'desc')->first();
     $id = $measurestored->id;
     //To Do:: Delete for measureranges
     $measureController = new MeasureController();
     $measureController->delete($id);
     $measureidone = Measure::withTrashed()->find($id);
     $this->assertNotNull($measureidone->deleted_at);
 }