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:
@@ -35,6 +35,7 @@ class DocumentListTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
#[TestDox('create() succeeds')]
|
||||
public function testCreateSucceeds(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
@@ -43,6 +44,7 @@ class DocumentListTest extends TestCase
|
||||
$list = null;
|
||||
}
|
||||
|
||||
#[TestDox('items() succeeds')]
|
||||
public function testItemsSucceeds(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
@@ -57,6 +59,7 @@ class DocumentListTest extends TestCase
|
||||
$this->assertEquals(5, $count, 'There should have been 5 documents returned');
|
||||
}
|
||||
|
||||
#[TestDox('items() fails when already consumed')]
|
||||
public function testItemsFailsWhenAlreadyConsumed(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
@@ -69,6 +72,7 @@ class DocumentListTest extends TestCase
|
||||
iterator_to_array($list->items());
|
||||
}
|
||||
|
||||
#[TestDox('hasItems() succeeds with empty results')]
|
||||
public function testHasItemsSucceedsWithEmptyResults(): void
|
||||
{
|
||||
$list = DocumentList::create(
|
||||
@@ -78,6 +82,7 @@ class DocumentListTest extends TestCase
|
||||
$this->assertFalse($list->hasItems(), 'There should be no items in the list');
|
||||
}
|
||||
|
||||
#[TestDox('hasItems() succeeds with non-empty results')]
|
||||
public function testHasItemsSucceedsWithNonEmptyResults(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
@@ -90,6 +95,7 @@ class DocumentListTest extends TestCase
|
||||
$this->assertFalse($list->hasItems(), 'There should be no remaining items in the list');
|
||||
}
|
||||
|
||||
#[TestDox('map() succeeds')]
|
||||
public function testMapSucceeds(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
@@ -102,6 +108,7 @@ class DocumentListTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
#[TestDox('iter() succeeds')]
|
||||
public function testIterSucceeds(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
@@ -114,6 +121,7 @@ class DocumentListTest extends TestCase
|
||||
'Iteration did not have the expected result');
|
||||
}
|
||||
|
||||
#[TestDox('mapToArray() succeeds')]
|
||||
public function testMapToArraySucceeds(): void
|
||||
{
|
||||
$list = DocumentList::create(Query::selectFromTable(ThrowawayDb::TABLE), [],
|
||||
|
||||
Reference in New Issue
Block a user