Skip to content
Snippets Groups Projects
Commit 4e0b390f authored by Laurent's avatar Laurent
Browse files

hotline #18372 sites display order

regression fix
parent 6b669fb9
Branches
Tags
5 merge requests!715Master,!688Master,!687Hotline master,!683backport fix to master,!667Hotline#18372 sitotheque tri
......@@ -55,7 +55,7 @@ class ZendAfi_View_Helper_Accueil_Sito extends ZendAfi_View_Helper_Accueil_Base
if ($this->isTypeAffichagePlusRecents() && $nb_aff > 0) {
$sites = Class_Sitotheque::findAllBy(['limit' => 50]);
shuffle($last_sito);
shuffle($sites);
if(!$titre)
$titre = $this->translate()->_("Derniers sites ajoutés");
......
......@@ -165,6 +165,17 @@ class SitoViewHelperLastTest extends SitoViewHelperTestCase {
'//h2//a[contains(@href, "rmll.info")]',
'RMLL');
}
/** @test */
public function itemsShouldBeShuffled() {
$htmls = [];
for($i=0; $i<10; $i++) {
$htmls []= $this->_helper->getBoite();
}
$this->assertEquals(2, count(array_unique($htmls)));
}
}
......
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