set(1464.31); expect($store->get())->toBe(1464.31); }); it('get возвращает null, когда не задан', function () { expect((new Yandex360BalanceStore)->get())->toBeNull(); }); it('status отдаёт balance + updated_at', function () { $store = new Yandex360BalanceStore; expect($store->status())->toMatchArray(['balance' => null, 'updated_at' => null]); $store->set(500.0); $st = $store->status(); expect($st['balance'])->toBe(500.0); expect($st['updated_at'])->not->toBeNull(); }); it('null очищает баланс', function () { $store = new Yandex360BalanceStore; $store->set(500.0); $store->set(null); expect($store->get())->toBeNull(); expect($store->status()['balance'])->toBeNull(); });