diff --git a/Classes/Processing/BibEntryConfig.php b/Classes/Processing/BibEntryConfig.php index ae32acd..bcf4c0c 100644 --- a/Classes/Processing/BibEntryConfig.php +++ b/Classes/Processing/BibEntryConfig.php @@ -61,13 +61,13 @@ class BibEntryConfig [ 'field' => 'firstName', 'conditionField' => 'creatorType', - 'conditionValue' => 'editor', + 'conditionValue' => 'translator', 'conditionRelation' => 'eq' ], [ 'field' => 'lastName', 'conditionField' => 'creatorType', - 'conditionValue' => 'editor', + 'conditionValue' => 'translator', 'conditionRelation' => 'eq' ] ], @@ -132,7 +132,7 @@ public static function getAuthorHeader(): array public static function getEditorHeader(): array { - return [ self::postfix(self::EDITOR, '(Hg.)') ]; + return [ self::postfix(self::EDITOR, ' (Hg.)') ]; } public static function getBody(): array @@ -146,7 +146,7 @@ public static function getArticleFooter(): array self::postfix(self::PUBLICATION_TITLE, ' '), self::postfix(self::VOLUME, ' '), self::circumfix(self::DATE, '(', '), '), - self::circumfix(self::VOLUME, 'Nr. ', ', '), + self::circumfix(self::ISSUE, 'Nr. ', ', '), self::PAGES ]; } diff --git a/Tests/Unit/Processing/BibEntryProcessorTest.php b/Tests/Unit/Processing/BibEntryProcessorTest.php index 399e0a7..0878387 100644 --- a/Tests/Unit/Processing/BibEntryProcessorTest.php +++ b/Tests/Unit/Processing/BibEntryProcessorTest.php @@ -25,7 +25,7 @@ final class BibEntryProcessorTest extends UnitTestCase private string $authorFirstName = 'ex_author_first'; private string $authorLastName = 'ex_author_last'; - private string $editorFirstName = 'ex_edior_first'; + private string $editorFirstName = 'ex_editor_first'; private string $editorLastName = 'ex_editor_last'; private string $title = 'ex_title'; private string $bookTitle = 'ex_book_title'; @@ -148,8 +148,8 @@ public function headerIsProcessedCorrectly(): void $article = $this->subject->process($this->exampleArticleArray, new Collection(), new Collection()); $bookWithoutAuthor = $this->subject->process($this->exampleBookWithoutAuthorArray, new Collection(), new Collection()); - $expected = Str::of($this->authorLastName . ', ' . $this->authorFirstName); - $expectedWithoutAuthor = Str::of($this->editorLastName . ', ' . $this->editorFirstName); + $expected = Str::of($this->authorFirstName . ' ' . $this->authorLastName); + $expectedWithoutAuthor = Str::of($this->editorFirstName . ' ' . $this->editorLastName . ' (Hg.)'); self::assertEquals($book['tx_lisztcommon_header'], $expected); self::assertEquals($bookSection['tx_lisztcommon_header'], $expected); @@ -188,10 +188,10 @@ public function bookFooterIsProcessedCorrectly(): void public function bookSectionFooterIsProcessedCorrectly(): void { $bookSection = $this->subject->process($this->exampleBookSectionArray, new Collection(), new Collection()); - $expected = Str::of($this->editorFirstName . ' ' . $this->editorLastName . ': ' . - $this->bookTitle . ', ' . $this->place . ' ' . $this->date . ' ' . $this->pages); + $expected = Str::of('In ' . $this->bookTitle . ', ' . 'hg. von ' . $this->editorFirstName . ' ' . $this->editorLastName . + ', ' . $this->place . ' ' . $this->date . ', ' . $this->pages); - self::assertEquals($bookSection['tx_lisztcommon_body'], $this->title); + self::assertEquals($bookSection['tx_lisztcommon_footer'], $expected); } /** @@ -200,9 +200,10 @@ public function bookSectionFooterIsProcessedCorrectly(): void public function articleFooterIsProcessedCorrectly(): void { $article = $this->subject->process($this->exampleArticleArray, new Collection(), new Collection()); - $expected = Str::of($this->bookTitle . ', ' . $this->volume . '(' . $this->issue . ')' . $this->pages); + $expected = Str::of($this->bookTitle . ' ' . $this->volume . ' (' . $this->date . '), Nr. ' . $this->issue . ', ' . $this->pages); + var_dump($article['tx_lisztcommon_footer']); - self::assertEquals($article['tx_lisztcommon_body'], $this->title); + self::assertEquals($article['tx_lisztcommon_footer'], $expected); }