We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f936606 commit 84e9b0cCopy full SHA for 84e9b0c
src/QueryResult.php
@@ -107,6 +107,6 @@ public function offsetUnset($offset)
107
*/
108
public function count()
109
{
110
- return count($this->ref->data[$offset]);
+ return count($this->ref->data);
111
}
112
tests/QueryResultTest.php
@@ -61,4 +61,16 @@ public function testTextPattern()
61
$result = $this->record->query('020$a{$q=\ib.}')->text();
62
$this->assertEquals('9788200424420', $result);
63
64
+
65
+ public function testCount()
66
+ {
67
+ $result = $this->record->query('02.');
68
+ $this->assertCount(2, $result);
69
+ }
70
71
+ public function testEmptyCount()
72
73
+ $result = $this->record->query('03.');
74
+ $this->assertCount(0, $result);
75
76
0 commit comments