Skip to content

Commit 617b916

Browse files
committed
Add indicator test
1 parent c2a9eb5 commit 617b916

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/QueryResultTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function setUp()
1313
<record xmlns="http://www.loc.gov/MARC21/slim">
1414
<leader>99999cam a2299999 u 4500</leader>
1515
<controlfield tag="001">98218834x</controlfield>
16-
<datafield tag="020" ind1=" " ind2=" ">
16+
<datafield tag="020" ind1=" " ind2="3">
1717
<subfield code="a">8200424421</subfield>
1818
<subfield code="q">h.</subfield>
1919
<subfield code="c">Nkr 98.00</subfield>
@@ -49,6 +49,12 @@ public function testText()
4949
$this->assertEquals('8200424421', $result);
5050
}
5151

52+
public function testIndicator()
53+
{
54+
$result = $this->record->query('020')->first()->getIndicator(2);
55+
$this->assertEquals('3', $result);
56+
}
57+
5258
public function testTextPattern()
5359
{
5460
$result = $this->record->query('020$a{$q=\ib.}')->text();

0 commit comments

Comments
 (0)