From c40a2dc0af81a4fbbd7b32e60512c8e68f1a0496 Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@git-test.afi-sa.fr> Date: Mon, 2 Dec 2013 15:20:19 +0000 Subject: [PATCH] =?UTF-8?q?Prise=20en=20compte=20de=20l'envoi=20des=20heur?= =?UTF-8?q?es=20dans=20le=20formulaire=20d'=C3=A9dition=20des=20articles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/admin/controllers/CmsController.php | 2 +- .../modules/admin/controllers/CmsControllerTest.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/modules/admin/controllers/CmsController.php b/application/modules/admin/controllers/CmsController.php index 9adcd8650d0..3c7e4a3cfd9 100644 --- a/application/modules/admin/controllers/CmsController.php +++ b/application/modules/admin/controllers/CmsController.php @@ -409,7 +409,7 @@ class Admin_CmsController extends ZendAfi_Controller_Action { private function _toDate($str) { if ($str!==null && $str!=='') { $date = new Zend_Date($str, null, Zend_Registry::get('locale')); - return $date->getIso(); + return $date->toString('YYYY-MM-dd HH:mm'); } return null; diff --git a/tests/application/modules/admin/controllers/CmsControllerTest.php b/tests/application/modules/admin/controllers/CmsControllerTest.php index 15204cc975e..576bfc6cc01 100644 --- a/tests/application/modules/admin/controllers/CmsControllerTest.php +++ b/tests/application/modules/admin/controllers/CmsControllerTest.php @@ -736,8 +736,8 @@ class CmsControllerArticleConcertEditActionPostTest extends CmsControllerTestCas 'id_cat' => 34, 'debut' => '01/03/2011', 'fin' => '26/03/2011', - 'events_debut' => '02/03/2011', - 'events_fin' => '05/03/2011', + 'events_debut' => '02/03/2011 08:35', + 'events_fin' => '05/03/2011 10:42', 'ckeditor_contenu' => 'Ici: <img src="../../images/bonlieu.jpg" />', 'ckeditor_description' => 'Affiche: <img src="http://localhost' . BASE_URL . '/images/concert.jpg" />', 'id_lieu' => 3, @@ -790,14 +790,14 @@ class CmsControllerArticleConcertEditActionPostTest extends CmsControllerTestCas /** @test */ - function eventDebutShouldBe2011_03_02() { - $this->assertContains('2011-03-02', $this->concert->getEventsDebut()); + function eventDebutShouldBe2011_03_02_at_08_35() { + $this->assertContains('2011-03-02 08:35', $this->concert->getEventsDebut()); } /** @test */ - function eventFinShouldBe2011_03_05() { - $this->assertContains('2011-03-05', $this->concert->getEventsFin()); + function eventFinShouldBe2011_03_05_at_10_42() { + $this->assertContains('2011-03-05 10:42', $this->concert->getEventsFin()); } -- GitLab