points(['spear' => 10, 'light_cavalry' => 2, 'nobleman' => 1]))->toBe(10 + 6 + 10) ->and($defeated->points(['militia' => 7]))->toBe(7) ->and($defeated->points([]))->toBe(0); }); it('shares the points among defenders by what they had standing', function () { expect(Defeated::share(30, [5 => 20.0, 9 => 10.0]))->toBe([5 => 20, 9 => 10]) ->and(Defeated::share(30, []))->toBe([]); });