/** * Show the form for creating a new resource. * * @return Response */ public function create() { $measures = Measure::orderBy('name')->get(); $specimentypes = SpecimenType::orderBy('name')->get(); $testcategory = TestCategory::all(); $measuretype = MeasureType::all()->sortBy('id'); $organisms = Organism::orderBy('name')->get(); //Create TestType return View::make('testtype.create')->with('testcategory', $testcategory)->with('measures', $measures)->with('measuretype', $measuretype)->with('specimentypes', $specimentypes)->with('organisms', $organisms); }
/** * 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')->take(1)->get()->toArray(); $id = $measurestored[0]['id']; //To Do:: Delete for measureranges $measureController = new MeasureController(); $measureController->delete($id); $measureidone = Measure::withTrashed()->find($id); $this->assertNotNull($measureidone->deleted_at); }