diff --git a/library/ZendAfi/View/Helper/Admin/SubscribeUsers.php b/library/ZendAfi/View/Helper/Admin/SubscribeUsers.php index e7dd8ccf1fcb2021772fc629a439bb03fa250f6a..6da680e4da8095d623266826fb0da4b6caccf6a3 100644 --- a/library/ZendAfi/View/Helper/Admin/SubscribeUsers.php +++ b/library/ZendAfi/View/Helper/Admin/SubscribeUsers.php @@ -82,7 +82,7 @@ class ZendAfi_View_Helper_Admin_SubscribeUsers extends ZendAfi_View_Helper_BaseH public function render() { $content = '<table><thead><tr class="soustitre">'; - foreach(array('Nom', 'Prénom', 'Identifiant', '') as $column) + foreach(array('Nom', 'Prénom', 'Identifiant', 'Email', '') as $column) $content .= sprintf('<td>%s</td>', $column); $content .= '</tr></thead><tbody>'; @@ -106,11 +106,12 @@ class ZendAfi_View_Helper_Admin_SubscribeUsers extends ZendAfi_View_Helper_BaseH if ($_GET) $delete_url .= '?'.http_build_query($_GET); - return sprintf('<tr class="%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', + return sprintf('<tr class="%s"><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', 'first', $user->getNom(), $user->getPrenom(), $user->getLogin(), + $user->getMail(), $this->isReadOnly() ? '': $this->view->tagAnchor($delete_url, $this->view->boutonIco("type=del"))); } diff --git a/tests/application/modules/admin/controllers/NewsletterControllerTest.php b/tests/application/modules/admin/controllers/NewsletterControllerTest.php index 495b13b9eda8519ef5f48e58e5cd64f5544c91da..2ab1b9015ec40fcd493256cbf9c807ffd6797561 100644 --- a/tests/application/modules/admin/controllers/NewsletterControllerTest.php +++ b/tests/application/modules/admin/controllers/NewsletterControllerTest.php @@ -671,7 +671,7 @@ abstract class Admin_NewsletterControllerEditSubcsribersTestCase extends Admin_N public function setUp() { parent::setUp(); - $this->_mduchamp = Class_Users::newInstanceWithId(3, ['nom' => 'Duchamp', 'prenom' => 'Marcel', 'login' => 'mduchamp']); + $this->_mduchamp = Class_Users::newInstanceWithId(3, ['nom' => 'Duchamp', 'prenom' => 'Marcel', 'login' => 'mduchamp', 'mail' => 'marcel@free.fr']); $this->_nl_nouveautes = Class_Newsletter::newInstanceWithId(1, ['titre' => 'Nouveautés']) ->setUsers([$this->_mduchamp]); @@ -705,6 +705,25 @@ class Admin_NewsletterControllerEditSubcsribersTest extends Admin_NewsletterCont public function tdShouldContainsMarcel() { $this->assertXPathContentContains('//td', 'Marcel'); } + + + /** @test **/ + public function tdShouldContainsDuchamp() { + $this->assertXPathContentContains('//td', 'Duchamp'); + } + + + /** @test **/ + public function tdShouldContainsmduchamp() { + $this->assertXPathContentContains('//td', 'mduchamp'); + } + + + /** @test **/ + public function tdShouldContainsMarcelAtFreeFr() { + $this->assertXPathContentContains('//td', 'marcel@free.fr'); + } + }