public function testAcceptsNullWhereNullable()
 {
     $data = ['arg_1' => 'arg_1', 'arg_2' => ['array'], 'arg_3' => 'strtolower', 'arg_4' => null, 'arg_5' => false];
     $output = BuildParameterArray::forMethod(BuildParameterTestClass::class, 'testMethod')->apply($data);
     $this->assertEquals(array_values($data), $output);
 }
示例#2
0
 public function apply($instance)
 {
     $params = BuildParameterArray::forMethod($instance, $this->getMethod())->apply($this->getArgs());
     return call_user_func_array([$instance, $this->getMethod()], $params);
 }