/** * Receipt Update test * * @return void */ public function testUpdateReceipt() { $receipt = Receipt::first(); $toUpdate = ['eponimia' => $this->faker->word . '777']; $endpoint = $this->getEndpointWithToken($this->endpoint . '/' . $receipt->id); $this->call('PATCH', $endpoint, $toUpdate); //fetch inserted receipt $updated_receipt = Receipt::whereId($receipt->id)->first(); $this->assertEquals($toUpdate['eponimia'], $updated_receipt->eponimia); }