Slide 10
Slide 10 text
σʔλϓϩόΠμ
public function testSum(array $input, bool $expected)
{
$this->assertEquals($expected, sum($input));
}
public function dataProvider(): array
{
return [
['input' => [1, 2, 3], 'expected' => 6],
['input' => [2], 'expected' => 2],
['input' => [0, 0, 0], 'expected' => 0],
['input' => [], 'expected' => 0],
];
}