fix: settings for user localiation
This commit is contained in:
+1
-1
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user