Add pjson support for 1D arrays

This commit is contained in:
2024-07-04 12:05:29 -04:00
parent 478684621c
commit 5201e564ca
2 changed files with 24 additions and 4 deletions

View File

@@ -50,6 +50,13 @@ class ParametersTest extends TestCase
'JSON parameter not constructed correctly');
}
public function testJsonSucceedsForArrayOfPjsonClass(): void
{
$this->assertEquals([':it' => '{"pjson":[{"id":"997","name":"another test","num_value":94}]}'],
Parameters::json(':it',
['pjson' => [new PjsonDocument(new PjsonId('997'), 'another test', 94, 'nothing')]]),
'JSON parameter not constructed correctly');
}
public function testNameFieldsSucceeds(): void
{