Skip to content
Snippets Groups Projects

Hotline 6.55

Merged Ghislain Loas requested to merge hotline_6.55 into hotline_#17249_auto_open_vertical_menu
Viewing commit 28e2b095
Show latest version
1 file
+ 23
38
Preferences
Compare changes
@@ -36,9 +36,7 @@ abstract class CmsControllerCalendarActionTestCase extends AbstractControllerTes
'id_categorie' => '12-2',
'display_cat_select' => true,
'enabled_filters' => 'date;place;custom_field_2;zork',
'display_event_info' => 'none',
'mode-affichage' => 'article',
'display_full_page' => false]]],
'display_event_info' => 'none']]],
'options' => []];
@@ -229,10 +227,26 @@ class CmsControllerCalendarActionWithFiltersTest extends CmsControllerCalendarAc
class CmsControllerCalendarActionWithDayTest extends CmsControllerCalendarActionTestCase {
class CmsControllerCalendarActionWithDayTest extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
$cfg_accueil = ['modules' =>
[ '1' => [
'division' => '1',
'type_module' => 'CALENDAR',
'preferences' => ['mode-affichage' => 'article',
'display_full_page' => 0]]],
'options' => []];
$this->fixture('Class_Profil',
['id' => 3,
'browser' => 'opac',
'libelle' => 'Plop',
'cfg_accueil' => $cfg_accueil]);
$this->fixture('Class_Article',
['id' => 5,
'titre' => 'News of the 15th September',
@@ -251,7 +265,7 @@ class CmsControllerCalendarActionWithDayTest extends CmsControllerCalendarAction
ZendAfi_View_Helper_CalendarContent::setTimeSource($time_source);
ZendAfi_View_Helper_Calendar_Table::setTimeSource($time_source);
Class_Article::getLoader()
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Article')
->whenCalled('getArticlesByPreferences')
->with(['display_order' => 'EventDebut',
'id_categorie' => '',
@@ -291,45 +305,16 @@ class CmsControllerCalendarActionWithDayTest extends CmsControllerCalendarAction
->whenCalled('getArticlesByPreferences')
->with(['display_order' => 'EventDebut',
'id_categorie' => '12-2',
'id_categorie' => '',
'events_only' => true,
'event_date' => '2014-09',
'event_date' => '2014-09-30',
'id_bib' => 0,
'id_lieu' => '',
'custom_fields' => [],
'published' => true])
->answers([Class_Article::find(2), Class_Article::find(5)])
->whenCalled('getArticlesByPreferences')
->with(['display_order' => 'EventDebut',
'id_categorie' => '12-2',
'events_only' => true,
'event_date' => '2014-09',
'id_bib' => 0,
'id_lieu' => '',
'custom_fields' => [],
'published' => true,
'event_end_after' => '2014-09-02'])
->answers([Class_Article::find(2), Class_Article::find(5)])
->whenCalled('getArticlesByPreferences')
->with(['display_order' => 'EventDebut',
'id_categorie' => '12-2',
'events_only' => true,
'event_date' => '',
'id_bib' => 0,
'id_lieu' => '',
'custom_fields' => [],
'published' => true,
'event_start_after' => '2014-09',
'event_end_after' => '',
'limit' => 3])
->answers([Class_Article::find(2), Class_Article::find(5)])
->answers([Class_Article::find(2)])
->beStrict();
$this->dispatch('cms/calendar/date/2014-09-30/id_profil/3/id_module/1/opac/render/ajax', true);
}
@@ -348,7 +333,7 @@ class CmsControllerCalendarActionWithDayTest extends CmsControllerCalendarAction
/** @test **/
public function newsOfThe15ThSeptemberEventShouldNotBPresent() {
$this->assertNotXPathContentContains('//div[@class="calendar"]//article//header', 'News of the 15th September');
$this->assertNotXPathContentContains('//div[@id="boite_1"][@class="calendar"]//article//header', 'News of the 15th September', $this->_response->getBody());
}