Skip to content

Commit

Permalink
Test fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasHermanek committed Dec 13, 2024
1 parent 685e3e6 commit 342edb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/Domain/AuthorCleanPhrase/AuthorCleanPhraseProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function replace(string $string, array $authorParts, ExtSystem $extSystem
mode: AuthorCleanPhraseMode::Replace,
extSystem: $extSystem
);
$repository = $this->repository;
$authorIdReplacements = [];

foreach ($authorParts as $index => $author) {
Expand Down Expand Up @@ -69,7 +68,7 @@ function (array $matches) use (&$authorIdReplacements): string {

return new AuthorCleanResultDto(
$string,
$authorParts,
array_unique(array_filter($authorParts)),
CollectionHelper::newCollection($authorIdReplacements)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ private function createDataProvider(): array
'wordBoundary' => true,
],
],
'testAuthorString' => 'test',
'testAuthorString' => 'test; test again; test',
'expectedProcessResultBefore' => [
'authorNames' => ['test'],
'authorNames' => ['test', 'test again'],
'authors' => [],
],
'expectedProcessResultAfter' => [
'authorNames' => [],
'authorNames' => ['again'],
'authors' => [],
]
],
Expand Down

0 comments on commit 342edb0

Please sign in to comment.