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

Correction tests sur les libelles des noms de champ

parent 92a16266
Branches
Tags
No related merge requests found
......@@ -23,25 +23,29 @@ class CodificationNomChampsTest extends Storm_Test_ModelTestCase {
public function setUp() {
parent::setUp();
$this->old_sql = Zend_Registry::get('sql');
// $this->mock_sql
Class_AdminVar::newInstanceWithId('FACETTE_PCDM4_LIBELLE', ['valeur' => 'Scuds']);
Class_AdminVar::newInstanceWithId('FACETTE_DEWEY_LIBELLE', ['valeur' => 'Bouquins']);
$this->codification = new Class_Codification();
// $this->codification = Storm_Test_ObjectWrapper::getLoader()->onLoaderOfModel('Class_Codification');
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_CodifThesaurus')
->whenCalled('getIndices')
->answers([Class_CodifThesaurus::newInstanceWithId(3, ['id_thesaurus' => 'GENR',
'libelle_facette' => 'Genre Electre',
'libelle' => 'Genre '
->answers([Class_CodifThesaurus::newInstanceWithId(3,
['id_thesaurus' => 'GENR',
'libelle_facette' => 'Genre Electre',
'libelle' => 'Genre '
]),
Class_CodifThesaurus::newInstanceWithId(5, ['id_thesaurus' => 'THEM',
'libelle' => 'Themes ',
'libelle_facette' => 'Themes Electre'])
]
);
]);
$translate = Zend_Registry::get('translate');
$translate->setLocale('fr');
}
public function expectedChamps() {
$translate = Zend_Registry::get('translate');
$translate->setLocale('fr');
......@@ -51,7 +55,7 @@ class CodificationNomChampsTest extends Storm_Test_ModelTestCase {
[ ['A'],[$translate->_("Auteur")]],
[ ['B'],[$translate->_('Bibliothèque')]],
[ ['C'],[$translate->_('Collection')]],
[ ['D'],[getVar("FACETTE_DEWEY_LIBELLE")]],
[ ['D'],["Bouquins"]],
[ ['E'],[$translate->_('Editeur')]],
[ ['F'],[$translate->_("Centre d'intérêt")]],
[ ['G'],[$translate->_('Genre')]],
......@@ -63,7 +67,7 @@ class CodificationNomChampsTest extends Storm_Test_ModelTestCase {
[ ['M'],[$translate->_('Sujet')]],
[ ['N'],[$translate->_('Année')]],
[ ['O'],[$translate->_('Notes')]],
[ ['P'],[getVar("FACETTE_PCDM4_LIBELLE")]],
[ ['P'],["Scuds"]],
[ ['R'],[$translate->_('Résumé')]],
[ ['S'],[$translate->_('Section')]],
[ ['J'],[$translate->_('Titre')]],
......
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