/** * test for saving * * @return void */ public function testSave() { $dataAccess = new DataAccess(); $dataAccess->saveMedications('test1', '15'); $dataAccess->saveMedications('test2', '40'); $testMedication = Medication::where('name', 'test1')->firstOrFail(); $this->assertEquals('40', $testMedication->quantity); $testMedication = Medication::where('name', 'test2')->firstOrFail(); $this->assertEquals('55', $testMedication->quantity); }