Pinq\Tests\Integration\Traversable\SelectTest::testThatSelectUsesDefaultToValuesForUnsuppliedArgumentsToInternalFunctions PHP Method

testThatSelectUsesDefaultToValuesForUnsuppliedArgumentsToInternalFunctions() public method

public testThatSelectUsesDefaultToValuesForUnsuppliedArgumentsToInternalFunctions ( Pinq\ITraversable $values, array $data )
$values Pinq\ITraversable
$data array
    public function testThatSelectUsesDefaultToValuesForUnsuppliedArgumentsToInternalFunctions(\Pinq\ITraversable $values, array $data)
    {
        //Signature: str_pad($input, $pad_length, $pad_string = " ", $pad_type = STR_PAD_RIGHT)
        $paddedValues = $values->select('str_pad');
        //So the string should be $input and the key should be $pad_length and the rest is default values.
        $this->assertMatches($paddedValues, [5 => 'abc  ', 10 => 'hello     ', 20 => 'foo-bar-baz         ']);
    }