[['values' => [['value' => $selection, 'odd' => '1.80']]]]]; $result = \app\common\service\FootballSettlementService::totalHomeOrAway('100.00', 2, $detail); $result['amount'] = '100.00'; $this->assertEquals($expectedProfit, $result['profit_and_loss']); $this->assertSame($expectedPayout, \app\common\service\FootballSettlementService::payoutAmount($result)); } public function footballOutcomes(): array { return [ ['Over 1.5', '80', '180.00'], ['Over 1.75', '40', '140.00'], ['Over 2', '0', '100.00'], ['Over 2.25', '-50', '50.00'], ['Over 2.5', '-100', '0.00'], ]; } public function test_generic_draw_result_exposes_the_principal_refund(): void { $result = \app\common\service\FootballSettlementService::getResult(2, '100.00', '1.80'); $this->assertSame('100.00', $result['return_amount']); $this->assertSame('100.00', \app\common\service\FootballSettlementService::payoutAmount($result + ['amount' => '100.00'])); } }