Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/Mods/Reader/AccessConditionReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getAccessConditionsForBookDocument()
{
$accessConditions = $this->bookReader->getAccessConditions();
self::assertNotEmpty($accessConditions);
self::assertEquals(1, count($accessConditions));
self::assertCount(1, $accessConditions);
self::assertAccessConditionForBookDocument($accessConditions[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getAccessConditionsByQueryForBookDocument()
{
$accessConditions = $this->bookReader->getAccessConditions('[@type="use and reproduction"]');
self::assertNotEmpty($accessConditions);
self::assertEquals(1, count($accessConditions));
self::assertCount(1, $accessConditions);
self::assertAccessConditionForBookDocument($accessConditions[0]);
}

Expand Down Expand Up @@ -131,7 +131,7 @@ public function getAccessConditionsForSerialDocument()
{
$accessConditions = $this->serialReader->getAccessConditions();
self::assertNotEmpty($accessConditions);
self::assertEquals(1, count($accessConditions));
self::assertCount(1, $accessConditions);
self::assertAccessConditionForSerialDocument($accessConditions[0]);
}

Expand All @@ -142,7 +142,7 @@ public function getAccessConditionsByQueryForSerialDocument()
{
$accessConditions = $this->serialReader->getAccessConditions('[@type="restriction on access"]');
self::assertNotEmpty($accessConditions);
self::assertEquals(1, count($accessConditions));
self::assertCount(1, $accessConditions);
self::assertAccessConditionForSerialDocument($accessConditions[0]);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Mods/Reader/ClassificationReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getClassificationsForBookDocument()
{
$classifications = $this->bookReader->getClassifications();
self::assertNotEmpty($classifications);
self::assertEquals(2, count($classifications));
self::assertCount(2, $classifications);
self::assertFirstClassificationForBookDocument($classifications[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getClassificationsByQueryForBookDocument()
{
$classifications = $this->bookReader->getClassifications('[@authority="ddc"]');
self::assertNotEmpty($classifications);
self::assertEquals(1, count($classifications));
self::assertCount(1, $classifications);
self::assertSecondClassificationForBookDocument($classifications[0]);
}

Expand Down Expand Up @@ -116,7 +116,7 @@ public function getClassificationsForSerialDocument()
{
$classifications = $this->serialReader->getClassifications();
self::assertNotEmpty($classifications);
self::assertEquals(1, count($classifications));
self::assertCount(1, $classifications);
self::assertClassificationForSerialDocument($classifications[0]);
}

Expand All @@ -127,7 +127,7 @@ public function getClassificationsByQueryForSerialDocument()
{
$classifications = $this->serialReader->getClassifications('[@authority="ddc"]');
self::assertNotEmpty($classifications);
self::assertEquals(1, count($classifications));
self::assertCount(1, $classifications);
self::assertClassificationForSerialDocument($classifications[0]);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Mods/Reader/GenreReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getGenresForBookDocument()
{
$genres = $this->bookReader->getGenres();
self::assertNotEmpty($genres);
self::assertEquals(1, count($genres));
self::assertCount(1, $genres);
self::assertGenreForBookDocument($genres[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getGenresByQueryForBookDocument()
{
$genres = $this->bookReader->getGenres('[@authority="marcgt"]');
self::assertNotEmpty($genres);
self::assertEquals(1, count($genres));
self::assertCount(1, $genres);
self::assertGenreForBookDocument($genres[0]);
}

Expand Down Expand Up @@ -140,7 +140,7 @@ public function getGenresForSerialDocument()
{
$genres = $this->serialReader->getGenres();
self::assertNotEmpty($genres);
self::assertEquals(2, count($genres));
self::assertCount(2, $genres);
self::assertFirstGenreForSerialDocument($genres[0]);
}

Expand Down Expand Up @@ -178,7 +178,7 @@ public function getGenresByQueryForSerialDocument()
{
$genres = $this->serialReader->getGenres('[@usage="primary"]');
self::assertNotEmpty($genres);
self::assertEquals(1, count($genres));
self::assertCount(1, $genres);
self::assertFirstGenreForSerialDocument($genres[0]);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Mods/Reader/IdentifierReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getIdentifiersForBookDocument()
{
$identifiers = $this->bookReader->getIdentifiers();
self::assertNotEmpty($identifiers);
self::assertEquals(2, count($identifiers));
self::assertCount(2, $identifiers);
self::assertFirstIdentifierForBookDocument($identifiers[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getIdentifiersByQueryForBookDocument()
{
$identifiers = $this->bookReader->getIdentifiers('[@type="lccn"]');
self::assertNotEmpty($identifiers);
self::assertEquals(1, count($identifiers));
self::assertCount(1, $identifiers);
self::assertSecondIdentifierForBookDocument($identifiers[0]);
}

Expand Down Expand Up @@ -140,7 +140,7 @@ public function getIdentifiersForSerialDocument()
{
$identifiers = $this->serialReader->getIdentifiers();
self::assertNotEmpty($identifiers);
self::assertEquals(4, count($identifiers));
self::assertCount(4, $identifiers);
self::assertFirstIdentifierForSerialDocument($identifiers[0]);
}

Expand Down Expand Up @@ -178,7 +178,7 @@ public function getIdentifiersByQueryForSerialDocument()
{
$identifiers = $this->serialReader->getIdentifiers('[@type="issn"]');
self::assertNotEmpty($identifiers);
self::assertEquals(2, count($identifiers));
self::assertCount(2, $identifiers);
self::assertSecondIdentifierForSerialDocument($identifiers[1]);
}

Expand Down
8 changes: 4 additions & 4 deletions tests/Mods/Reader/LanguageReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getLanguagesForBookDocument()
{
$languages = $this->bookReader->getLanguages();
self::assertNotEmpty($languages);
self::assertEquals(2, count($languages));
self::assertCount(2, $languages);
self::assertFirstLanguageForBookDocument($languages[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getLanguagesByQueryForBookDocument()
{
$languages = $this->bookReader->getLanguages('[@objectPart="summary"]');
self::assertNotEmpty($languages);
self::assertEquals(1, count($languages));
self::assertCount(1, $languages);
self::assertSecondLanguageForBookDocument($languages[0]);
}

Expand Down Expand Up @@ -140,7 +140,7 @@ public function getLanguagesForSerialDocument()
{
$languages = $this->serialReader->getLanguages();
self::assertNotEmpty($languages);
self::assertEquals(1, count($languages));
self::assertCount(1, $languages);
self::assertLanguageForSerialDocument($languages[0]);
}

Expand All @@ -151,7 +151,7 @@ public function getLanguagesByQueryForSerialDocument()
{
$languages = $this->serialReader->getLanguages('[./mods:languageTerm[@type="code"]]');
self::assertNotEmpty($languages);
self::assertEquals(1, count($languages));
self::assertCount(1, $languages);
self::assertLanguageForSerialDocument($languages[0]);
}

Expand Down
10 changes: 5 additions & 5 deletions tests/Mods/Reader/LocationReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getLocationsForBookDocument()
{
$locations = $this->bookReader->getLocations();
self::assertNotEmpty($locations);
self::assertEquals(2, count($locations));
self::assertCount(2, $locations);
self::assertFirstLocationForBookDocument($locations[0]);
}

Expand Down Expand Up @@ -67,7 +67,7 @@ public function getLocationsByQueryForBookDocument()
{
$locations = $this->bookReader->getLocations('[@displayLabel="links"]');
self::assertNotEmpty($locations);
self::assertEquals(1, count($locations));
self::assertCount(1, $locations);
self::assertSecondLocationForBookDocument($locations[0]);

$this->expectException(IncorrectValueInAttributeException::class);
Expand Down Expand Up @@ -144,7 +144,7 @@ public function getLocationsForSerialDocument()
{
$locations = $this->serialReader->getLocations();
self::assertNotEmpty($locations);
self::assertEquals(2, count($locations));
self::assertCount(2, $locations);
self::assertLocationForSerialDocument($locations[0]);
}

Expand All @@ -155,7 +155,7 @@ public function getLocationsByQueryForSerialDocument()
{
$locations = $this->serialReader->getLocations('[./mods:url[@usage="primaryDisplay"]]');
self::assertNotEmpty($locations);
self::assertEquals(1, count($locations));
self::assertCount(1, $locations);
self::assertLocationForSerialDocument($locations[0]);
}

Expand Down Expand Up @@ -196,7 +196,7 @@ private static function assertSecondLocationForBookDocument(Location $location)

$urls = $location->getUrls();
self::assertNotEmpty($urls);
self::assertEquals(4, count($urls));
self::assertCount(4, $urls);
self::assertEquals('2024-01-27', $urls[0]->getDateLastAccessed());
self::assertEquals('http://www.slub-dresden.de/some-url', $urls[0]->getValue());
self::assertEquals('preview', $urls[1]->getAccess());
Expand Down
16 changes: 8 additions & 8 deletions tests/Mods/Reader/NameReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getNamesForBookDocument()
{
$names = $this->bookReader->getNames();
self::assertNotEmpty($names);
self::assertEquals(2, count($names));
self::assertCount(2, $names);
self::assertFirstNameForBookDocument($names[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getNamesByQueryForBookDocument()
{
$names = $this->bookReader->getNames('[@type="personal" and not(@usage="primary")]');
self::assertNotEmpty($names);
self::assertEquals(1, count($names));
self::assertCount(1, $names);
self::assertSecondNameForBookDocument($names[0]);
}

Expand Down Expand Up @@ -140,7 +140,7 @@ public function getNamesForSerialDocument()
{
$names = $this->serialReader->getNames();
self::assertNotEmpty($names);
self::assertEquals(1, count($names));
self::assertCount(1, $names);
self::assertNameForSerialDocument($names[0]);
}

Expand All @@ -151,7 +151,7 @@ public function getNamesByQueryForSerialDocument()
{
$names = $this->serialReader->getNames('[@type="corporate"]');
self::assertNotEmpty($names);
self::assertEquals(1, count($names));
self::assertCount(1, $names);
self::assertNameForSerialDocument($names[0]);
}

Expand Down Expand Up @@ -194,8 +194,8 @@ private static function assertSecondNameForBookDocument(Name $name)
self::assertNotEmpty($name->getValue());

$nameParts = $name->getNameParts();
self::assertNotEmpty($name->getNameParts());
self::assertEquals(2, count($nameParts));
self::assertNotEmpty($nameParts);
self::assertCount(2, $nameParts);
self::assertEquals('given', $nameParts[0]->getType());
self::assertEquals('Aron', $nameParts[0]->getValue());

Expand All @@ -214,8 +214,8 @@ private static function assertNameForSerialDocument(Name $name)
self::assertNotEmpty($name->getValue());

$nameParts = $name->getNameParts();
self::assertNotEmpty($name->getNameParts());
self::assertEquals(1, count($nameParts));
self::assertNotEmpty($nameParts);
self::assertCount(1, $nameParts);
self::assertEquals('International Consortium for the Advancement of Academic Publication.', $nameParts[0]->getValue());
}
}
8 changes: 4 additions & 4 deletions tests/Mods/Reader/NoteReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function getNotesForBookDocument()
{
$notes = $this->bookReader->getNotes();
self::assertNotEmpty($notes);
self::assertEquals(2, count($notes));
self::assertCount(2, $notes);
self::assertFirstNoteForBookDocument($notes[0]);
}

Expand Down Expand Up @@ -66,7 +66,7 @@ public function getNotesByQueryForBookDocument()
{
$notes = $this->bookReader->getNotes('[@type="bibliography"]');
self::assertNotEmpty($notes);
self::assertEquals(1, count($notes));
self::assertCount(1, $notes);
self::assertSecondNoteForBookDocument($notes[0]);
}

Expand Down Expand Up @@ -140,7 +140,7 @@ public function getNotesForSerialDocument()
{
$notes = $this->serialReader->getNotes();
self::assertNotEmpty($notes);
self::assertEquals(6, count($notes));
self::assertCount(6, $notes);
self::assertFirstNoteForSerialDocument($notes[0]);
}

Expand Down Expand Up @@ -178,7 +178,7 @@ public function getNotesByQueryForSerialDocument()
{
$notes = $this->serialReader->getNotes('[@type="system details"]');
self::assertNotEmpty($notes);
self::assertEquals(1, count($notes));
self::assertCount(1, $notes);
self::assertFifthNoteForSerialDocument($notes[0]);
}

Expand Down
Loading
Loading