Changes for beta10 (#5)

- Add In/InArray support
- Add ORDER BY support for `Find` functions
- Update dependencies
- Implement fixes identified via static analysis

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2024-09-27 02:15:00 +00:00
parent 9e0e663811
commit d067f8983f
66 changed files with 1728 additions and 664 deletions

View File

@@ -44,7 +44,7 @@ class DocumentMapperTest extends TestCase
$this->assertEquals('json', $mapper->fieldName, 'Field name not recorded correctly');
}
#[TestDox('Map succeeds with valid JSON')]
#[TestDox('map() succeeds with valid JSON')]
public function testMapSucceedsWithValidJSON(): void
{
$doc = (new DocumentMapper(TestDocument::class))->map(['data' => '{"id":7,"subDoc":{"id":22,"name":"tester"}}']);
@@ -55,7 +55,7 @@ class DocumentMapperTest extends TestCase
$this->assertEquals('tester', $doc->subDoc->name, 'Sub-document name not filled correctly');
}
#[TestDox('Map succeeds with valid JSON for pjson class')]
#[TestDox('map() succeeds with valid JSON for Pjson class')]
public function testMapSucceedsWithValidJSONForPjsonClass(): void
{
$doc = (new DocumentMapper(PjsonDocument::class))->map(['data' => '{"id":"seven","name":"bob","num_value":8}']);
@@ -66,14 +66,14 @@ class DocumentMapperTest extends TestCase
$this->assertFalse(isset($doc->skipped), 'Non-JSON field has not been set');
}
#[TestDox('Map fails with invalid JSON')]
#[TestDox('map() fails with invalid JSON')]
public function testMapFailsWithInvalidJSON(): void
{
$this->expectException(DocumentException::class);
(new DocumentMapper(TestDocument::class))->map(['data' => 'this is not valid']);
}
#[TestDox('Map fails with invalid JSON for pjson class')]
#[TestDox('map() fails with invalid JSON for Pjson class')]
public function testMapFailsWithInvalidJSONForPjsonClass(): void
{
$this->expectException(DocumentException::class);