create([ 'name' => 'Supplier A', 'email' => 'a@example.com', ]); $this->assertTrue($result['ok']); $this->assertDatabaseHas('suppliers', ['name' => 'Supplier A']); } public function test_update_supplier(): void { $id = DB::table('suppliers')->insertGetId([ 'name' => 'Supplier B', 'created_at' => now(), 'updated_at' => now(), ]); $service = new SupplierService; $result = $service->update($id, ['name' => 'Supplier Updated']); $this->assertTrue($result['ok']); $this->assertDatabaseHas('suppliers', ['id' => $id, 'name' => 'Supplier Updated']); } }