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

Merge branch 'hotline#67188_pb_de_duplication_d_evenements_dans_l_agenda' into 'stable'

hotline #67188 fix liraries order in article form

See merge request !2484
parents 0f408c15 45822473
Branches
Tags
1 merge request!2484hotline #67188 fix liraries order in article form
Pipeline #3447 passed with stage
in 25 minutes and 54 seconds
- ticket #67188 : Administration : les bibliothèques sont triées par nom dans le sélecteur de catégorie du formulaire de modification des articles.
\ No newline at end of file
......@@ -34,7 +34,7 @@ class BibLoader extends Storm_Model_Loader {
protected $_portail;
public function findAllWithPortail() {
$all_bibs = Class_Bib::getLoader()->findAll();
$all_bibs = Class_Bib::findAllBy(['order' => 'libelle']);
array_unshift($all_bibs, $this->getPortail());
return $all_bibs;
}
......
......@@ -90,4 +90,27 @@ class BibTest extends Storm_Test_ModelTestCase {
}
?>
\ No newline at end of file
class BibFindAllWithPortailTest extends Storm_Test_ModelTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$this->fixture('Class_Bib',
['id' => 1,
'libelle' => 'BBB']);
$this->fixture('Class_Bib',
['id' => 2,
'libelle' => 'AAA']);
}
/** @test */
public function bibBBBShouldBeLast() {
$this->assertEquals(1, Class_Bib::findAllWithPortail()[2]->getId());
}
}
\ 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