We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently we can't set order of columns if we use headers:
$response ->setStatus(200) ->setBody([ 'csvHeaders' => true, 'column:id' => "matching(regex, '^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$','{$id}')", 'column:name' => "matching(type,'{$name}')", 'column:gender' => "matching(regex, 'male|female|other','{$gender}')", ]) ->setContentType('text/csv') ;
Then mock server will response with columns that are sorted by column's name in ascending order:
gender,id,name $gender,$id,$name
I suggest adding 'csvColumns' => 'id,name,gender' so:
'csvColumns' => 'id,name,gender'
The text was updated successfully, but these errors were encountered:
The main problem is that the map used for the data here
[ 'csvHeaders' => true, 'column:id' => "matching(regex, '^[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$','{$id}')", 'column:name' => "matching(type,'{$name}')", 'column:gender' => "matching(regex, 'male|female|other','{$gender}')", ]
does not guarantee insertion order. This will need some other mechanism to determine what the key order is.
Sorry, something went wrong.
No branches or pull requests
Currently we can't set order of columns if we use headers:
Then mock server will response with columns that are sorted by column's name in ascending order:
I suggest adding
'csvColumns' => 'id,name,gender'
so:The text was updated successfully, but these errors were encountered: