fix: settings for user localiation

This commit is contained in:
hackerESQ
2025-07-22 21:51:54 -05:00
parent a13bd9f0dc
commit 4086168515
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ class User extends Authenticatable implements MustVerifyEmail
return Arr::get($this->options, 'locale') ?? request()->getPreferredLanguage($available_locales) ?? config('app.locale');
}
public function setOption(mixed $key, string $value): self
public function setOption(mixed $key, ?string $value = null): self
{
$options = is_array($key) ? $key : [$key => $value];
+8
View File
@@ -572,6 +572,14 @@ class MultiCurrencyTest extends TestCase
->getPortfolioMetrics();
$this->assertEqualsWithDelta($metrics->get('total_market_value'), $dailyChange->last()->total_market_value, 0.01);
// expected 2773.034 Failed asserting that 2816.46 matches .
// "total_cost_basis" => 1771.476
// "total_gain_dollars" => 300.234
// +"total_cost_basis": 1765.431
// +"total_gain": 306.279
$this->assertEqualsWithDelta($metrics->get('total_cost_basis'), $dailyChange->last()->total_cost_basis, 0.01);
$this->assertEqualsWithDelta($metrics->get('realized_gain_dollars'), $dailyChange->last()->realized_gain_dollars, 0.01);
$this->assertEqualsWithDelta($metrics->get('total_market_value') - $metrics->get('total_cost_basis'), $dailyChange->last()->total_gain, 0.01);