Jyxo\Input\ValidatorTest::getGoodValues PHP Method

getGoodValues() private method

Prepares right values for validation - shuffles the array
private getGoodValues ( array $good ) : array
$good array Values retrieved from the static validator getter
return array Array ready for validation
    private function getGoodValues($good)
    {
        $this->assertInternalType('array', $good, 'Variable is not an array.');
        // Adds values again - in reversed order
        $good = array_merge($good, array_reverse($good));
        $count = count($good);
        // Shuffles the array
        $this->assertTrue(shuffle($good), 'Shuffle function failures.');
        // Checks if nothing was lost during shuffle
        $this->assertEquals($count, count($good), 'Some of items lost from array during shuffle function!');
        return $good;
    }