Skip to content

Commit ccd3012

Browse files
committed
test: Add test using binary marc
1 parent 81e7f4d commit ccd3012

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/CollectionTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ public function testEmptyCollection()
1515
$this->assertCount(0, $collection->toArray());
1616
}
1717

18+
public function testBinaryMarc()
19+
{
20+
$records = Collection::fromFile('tests/data/sandburg.mrc')->toArray();
21+
22+
$this->assertCount(1, $records);
23+
$this->assertEquals('Arithmetic', $records[0]->title);
24+
}
25+
1826
public function testBibsysOaiPmhSample()
1927
{
2028
$collection = Collection::fromFile('tests/data/oaipmh-bibsys.xml');

tests/data/sandburg.mrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
01142cam 2200301 a 4500001001300000003000400013005001700017008004100034010001700075020002500092040001800117042000900135050002600144082001600170100003200186245008600218250001200304260005200316300004900368500004000417520022800457650003300685650003300718650002400751650002100775650002300796700002100819 92005291 DLC19930521155141.9920219s1993 caua j 000 0 eng  a 92005291  a0152038655 :c$15.95 aDLCcDLCdDLC alcac00aPS3537.A618bA88 199300a811/.522201 aSandburg, Carl,d1878-1967.10aArithmetic /cCarl Sandburg ; illustrated as an anamorphic adventure by Ted Rand. a1st ed. aSan Diego :bHarcourt Brace Jovanovich,cc1993. a1 v. (unpaged) :bill. (some col.) ;c26 cm. aOne Mylar sheet included in pocket. aA poem about numbers and their characteristics. Features anamorphic, or distorted, drawings which can be restored to normal by viewing from a particular angle or by viewing the image's reflection in the provided Mylar cone. 0aArithmeticxJuvenile poetry. 0aChildren's poetry, American. 1aArithmeticxPoetry. 1aAmerican poetry. 1aVisual perception.1 aRand, Ted,eill.

0 commit comments

Comments
 (0)