/** * @dataProvider simpleArrayProvider */ public function testGetRandomValues(array $array) { if (0 === count($array)) { return; } $ma = new MutableArray($array); $values = $ma->getRandomValues(2); $this->assertCount(2, $values); foreach ($values as $value) { $this->assertTrue(in_array($value, $array)); } }