Skip to content
Snippets Groups Projects
Commit 32af275b authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

rel #14409 : fix tests failures

parent 323c1fbc
Branches
Tags
2 merge requests!529Hotline 6.56,!407Dev/14409 filters in calendar box
......@@ -134,13 +134,13 @@ class CmsControllerCalendarActionWithFiltersTest extends CmsControllerCalendarAc
$this->fixture('Class_CustomField_Value',
['id' => 5,
'custom_field_id' => $theme->getId(),
'model' => $this->_nanook2,
'model_id' => $this->_nanook2->getId(),
'value' => 'sigb']);
$this->fixture('Class_CustomField_Value',
['id' => 2,
'custom_field_id' => $theme->getId(),
'model' => $this->_opac4,
'model_id' => $this->_opac4->getId(),
'value' => 'opac']);
}
......@@ -155,15 +155,12 @@ class CmsControllerCalendarActionWithFiltersTest extends CmsControllerCalendarAc
'events_fin' => '2011-02-22']);
$this->setupCustomFields();
$common_preferences = [
'display_order' => 'EventDebut',
$common_preferences = ['display_order' => 'EventDebut',
'id_categorie' => '',
'events_only' => true,
'id_bib' => 0,
'id_lieu' => '',
'custom_fields' => [
2 => 'opac',
],
'custom_fields' => [2 => 'opac'],
'published' => true];
$this->_date = date('Y-m', mktime(0, 0, 0, date('n') + 5));
......@@ -186,7 +183,7 @@ class CmsControllerCalendarActionWithFiltersTest extends CmsControllerCalendarAc
/** @test **/
function calendarWithCustomFieldFiltersShouldBuildPreferencesForGetArticlesByPreferences() {
public function calendarWithCustomFieldFiltersShouldBuildPreferencesForGetArticlesByPreferences() {
$this->assertXPathContentContains('//a[@class="calendar_event_title"]',
'OPAC 4 en prod !');
}
......@@ -198,24 +195,25 @@ class CmsControllerCalendarActionWithFiltersTest extends CmsControllerCalendarAc
'Novembre');
}
/** @test */
public function selectedMonthFilterShouldHaveClassSelected() {
$this->assertXPath('//li[@class="date"]//li[@class="selected"]/a[contains(@href, "/cms/calendar/id_module/1/custom_field_2/opac/date/' . $this->_date . '")]',
$this->_response->getBody());
$this->assertXPath('//li[@class="date"]//li[@class="selected"]/a[contains(@href, "/cms/calendar/id_module/1/custom_field_2/opac/date/' . $this->_date . '")]');
}
/** @test */
public function themeFilterShouldContainsDate() {
$this->assertXPathContentContains('//li[@class="custom_field_2"]//li//a[contains(@href, "/cms/calendar/id_module/1/date/' . $this->_date . '/custom_field_2/sigb")]',
$this->assertXPathContentContains('//li[@class="custom_field_2"]//li//a[contains(@href, "/cms/calendar/id_module/1/custom_field_2/sigb/date/' . $this->_date . '")]',
'sigb');
}
/** @test */
public function monthFilterShouldHaveTitleMois() {
$this->assertXPathContentContains('//ul[@class="filters"]/li[@class="date"]/h2', 'Mois');
$this->assertXPathContentContains('//ul[@class="filters"]/li[@class="date"]/h2',
'Mois');
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment