mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Add unit test for currency endpoint
This commit is contained in:
committed by
Gregor Vostrak
parent
411fc6ea5e
commit
284d8cd786
@@ -6,6 +6,7 @@ namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Service\CurrencyService;
|
||||
use Brick\Money\Currency;
|
||||
use Brick\Money\ISOCurrencyProvider;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
@@ -23,7 +24,7 @@ class CurrencyController extends Controller
|
||||
$currencyService = app(CurrencyService::class);
|
||||
|
||||
$currencies = array_values(array_map(
|
||||
fn ($currency) => [
|
||||
fn (Currency $currency): array => [
|
||||
'code' => $currency->getCurrencyCode(),
|
||||
'name' => $currency->getName(),
|
||||
'symbol' => $currencyService->getCurrencySymbol($currency->getCurrencyCode()),
|
||||
|
||||
Reference in New Issue
Block a user