Some notes in code.

This commit is contained in:
James Cole 2021-03-16 07:23:53 +01:00
parent a43bd745d1
commit 690edb8fcc
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D

View File

@ -232,4 +232,56 @@ class StoreControllerTest extends TestCase
],
];
}
public function someTestData(): void
{
$set = [
// set for withdrawal, copy this for
// other transaction types etc.
// make a CLASS!!
'identifier' => [
'mandatory_fields' => [
'name_of_set' => [
'fields' => [
'basic_text_field' => [
'test_value' => function () {
return 'callback';
},
'expected_return_value' => function ($input) {
// the same?
return $input;
// a conversion?
return (string)$input;
// something else entirely?
return 'something else entirely.';
},
'ignore_other_fields' => [
'key_to_ignore',
'sub_array_like_transactions' => [0 => 'field_to_ignore'],
],
],
'another_basic_text_field' => [
// see above for 'test_value', 'expected_return_value' and 'ignore_other_fields'
],
'complex_array_field_like_transactions' => [
'transactions' => [
0 => [
'field_is_here' => [
'test_value' => null, // see above
'expected_return_value' => null, // see above
'ignore_other_fields' => [], // see above
],
],
],
],
],
],
],
// these will be permutated
'optional_fields' => [],
],
];
}
}