File tree 2 files changed +32
-1
lines changed
2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Query
12
12
{
13
13
public function documents (array $ options = [])
14
14
{
15
- $ value = $ this ->apiClient ->get ($ this ->uri );
15
+ $ value = $ this ->apiClient ->get ($ this ->uri . ' ? ' . http_build_query ( $ options ) );
16
16
17
17
if (empty ($ value )) {
18
18
return [];
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Morrislaptop \Firestore \Tests ;
4
+
5
+ class CollectionTest extends TestCase
6
+ {
7
+ /**
8
+ * @var CollectionReference
9
+ */
10
+ private $ collection ;
11
+
12
+ public function setUp ()
13
+ {
14
+ $ this ->collection = self ::$ firestore ->collection ('test-lists ' );
15
+ }
16
+
17
+ public function testDocuments ()
18
+ {
19
+ // Arrange.
20
+ for ($ i = 0 ; $ i < 30 ; $ i ++) {
21
+ $ doc = $ this ->collection ->document (__FUNCTION__ . $ i );
22
+ $ doc ->set (['test ' => true ]);
23
+ }
24
+
25
+ // Act.
26
+ $ docs = $ this ->collection ->documents (['pageSize ' => 100 ]);
27
+
28
+ // Assert.
29
+ $ this ->assertSame ($ docs ->size (), 30 );
30
+ }
31
+ }
You can’t perform that action at this time.
0 commit comments