From 0045ecb68e32268f94289233357a7524d8680e45 Mon Sep 17 00:00:00 2001 From: Laurent Laffont <llaffont@afi-sa.fr> Date: Thu, 13 Dec 2018 16:09:53 +0100 Subject: [PATCH] dev #81899 fix missing title param --- library/Class/CodifAuteur/Description.php | 3 ++- tests/scenarios/AuthorPage/AuthorPageTest.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/library/Class/CodifAuteur/Description.php b/library/Class/CodifAuteur/Description.php index 3697446a100..bf73f47d7ee 100644 --- a/library/Class/CodifAuteur/Description.php +++ b/library/Class/CodifAuteur/Description.php @@ -203,7 +203,8 @@ class Class_CodifAuteur_Description { $replace []= $view->tag('a', $record_title, ['href' => $base_url . $record->getId(), - 'title' => $this->_('Accéder au document %s')]); + 'title' => $this->_('Accéder au document: %s', + $record_title)]); } return str_ireplace($search, $replace, $biography); diff --git a/tests/scenarios/AuthorPage/AuthorPageTest.php b/tests/scenarios/AuthorPage/AuthorPageTest.php index a478a65fb66..cbc0def1d59 100644 --- a/tests/scenarios/AuthorPage/AuthorPageTest.php +++ b/tests/scenarios/AuthorPage/AuthorPageTest.php @@ -162,7 +162,8 @@ class AuthorPageViewByIdTest extends AuthorPageTestCase { /** @test */ public function biographyTextLesMiserablesShouldBeReplacedByLinkToRecord() { - $this->assertXPathContentContains('//div[@class="biography"]//a[contains(@href, "/recherche/viewnotice/code_rebond/A2408/id/9")]', 'Les Misérables'); + $this->assertXPathContentContains('//div[@class="biography"]//a[contains(@href, "/recherche/viewnotice/code_rebond/A2408/id/9")][@title="Accéder au document: Les Misérables"]', + 'Les Misérables'); } -- GitLab