Skip to content
Snippets Groups Projects
Commit 3ad56369 authored by llaffont's avatar llaffont
Browse files

Correction affichage ordre des paniers de notices

parent e0bb1679
Branches
Tags
No related merge requests found
......@@ -79,7 +79,8 @@ class Class_PanierNotice extends Storm_Model_Abstract {
public function getNoticesAsArray() {
$cles = $this->getClesNotices();
return Class_Notice::getLoader()->findAllBy(array('clef_alpha' => $cles));
return Class_Notice::getLoader()->findAllBy(['clef_alpha' => $cles,
'order' => 'FIELD(clef_alpha, "'.implode('","', $cles).'")']);
}
......
......@@ -76,7 +76,8 @@ abstract class PanierControllerTestCase extends AbstractControllerTestCase {
->answers($montespan)
->whenCalled('findAllBy')
->with(['clef_alpha' => ['MONTESPAN']])
->with(['clef_alpha' => ['MONTESPAN'],
'order' => 'FIELD(clef_alpha, "MONTESPAN")'])
->answers([$montespan]);
......
......@@ -85,7 +85,8 @@ class PanierNoticeWithThreeNoticesTest extends ModelTestCase {
->_generateLoaderFor('Class_Notice', array('findAllBy'))
->expects($this->once())
->method('findAllBy')
->with(array('clef_alpha' => array('STARWARS', 'INDIANAJONES', 'SPIDERMAN')))
->with(['clef_alpha' => ['STARWARS', 'INDIANAJONES', 'SPIDERMAN'],
'order' => 'FIELD(clef_alpha, "STARWARS","INDIANAJONES","SPIDERMAN")'])
->will($this->returnValue(array($this->star_wars, $this->indiana_jones, $this->spiderman)));
}
......
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