Пример #1
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     // List all the active testtypes
     $testtypes = TestType::orderBy('name', 'ASC')->get();
     // Load the view and pass the testtypes
     return view('testtype.index', compact('testtypes'));
 }
Пример #2
0
 public function testCountPerStatus()
 {
     $this->withoutMiddleware();
     $this->call('POST', '/testtype', $this->testTypeData);
     $testTypestored = TestType::orderBy('id', 'desc')->first();
     $testTypeSaved = TestType::find($testTypestored->id);
     $count = $testTypeSaved->countPerStatus([Test::NOT_RECEIVED, Test::STARTED, Test::PENDING, Test::COMPLETED, Test::VERIFIED]);
     $this->assertEquals($testTypeSaved->tests->count(), $count);
 }