/** * @dataProvider numericSubjectProvider * @covers ::reduce */ public function test_reduce_return(testSubject $subject) { if (!$subject->isEmpty()) { $add2 = function ($a, $b) { return $a + $b; }; self::assertEquals(array_sum($subject->toArray()), $subject->reduce($add2)); } }