/** * @dataProvider padStrings */ 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 ']); }
public function visitSelect(Segments\Select $query) { $this->traversable = $this->traversable->select($this->resolvedParameters[$query->getProjectionFunction()->getCallableId()]); }