Commit e61f70b6 authored by Patrick Barroca's avatar Patrick Barroca 🐧

fix upgrade db backward compatibility

parent 26d1ed59
Pipeline #10661 passed with stage
in 71 minutes and 36 seconds
......@@ -95,7 +95,8 @@ abstract class AbstractControllerTestCase extends Zend_Test_PHPUnit_ControllerTe
->setLogin($account->username)
->setRoleLevel($account->ROLE_LEVEL)
->setIdSite($account->ID_SITE)
->setDateMaj('');
->setDateMaj('')
->setDisableNewsletter(0);
ZendAfi_Auth::getInstance()->getStorage()->write($account);
}
......
......@@ -76,7 +76,8 @@ abstract class AbonneControllerChangePasswordOnKohaTestCase extends AbstractCont
'id_site' => 11,
'int_bib' => $this->_int_bib,
'idabon' => '123456',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB]);
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB,
'disable_newsletter' => 0]);
}
......@@ -121,8 +122,6 @@ class AbonneControllerChangePasswordOnKohaWithRestfulTest
}
/** @test */
public function passwordShouldHaveBeenUpdatedToCe1bnm2p() {
$this->postDispatch('/abonne/edit', ['password' => 'Ce1bnm2p',
......@@ -131,6 +130,7 @@ class AbonneControllerChangePasswordOnKohaWithRestfulTest
$this->assertEquals('Ce1bnm2p', Class_Users::getIdentity()->getPassword());
}
/** @test */
public function shortPasswordShouldTriggerError() {
$this->postDispatch('/abonne/edit', ['password' => 'test',
......@@ -140,6 +140,7 @@ class AbonneControllerChangePasswordOnKohaWithRestfulTest
"Mot de passe trop court");
}
/** @test */
public function weakPasswordShouldTriggerError() {
$this->postDispatch('/abonne/edit', ['password' => 'testingsimple',
......@@ -302,7 +303,8 @@ class AbonneControllerChangePasswordOnNanookTest extends AbstractControllerTestC
'int_bib' => $sigb_plage,
'idabon' => '123456',
'id_sigb' => '111',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB]);
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB,
'disable_newsletter' => 0]);
$nanook_user->setFicheSigb(['type_comm' => Class_IntBib::COM_KOHA,
'fiche' => Class_WebService_SIGB_Emprunteur::nullInstance()]);
......
......@@ -68,7 +68,8 @@ abstract class AbonneControllerEditActionWithAbonneSIGBTestCase extends Abstract
'id_site' => 1,
'id_int_bib' => 1,
'password' => 'secret',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB]);
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB,
'disable_newsletter' => 0]);
ZendAfi_Auth::getInstance()->logUser($this->_jerome);
}
......
......@@ -32,20 +32,22 @@ abstract class AbstractAbonneControllerNewslettersTestCase extends AbstractContr
Class_AdminVar::newInstanceWithId('CHAMPS_FICHE_UTILISATEUR',
['valeur' => 'pseudo;nom;prenom;mail;password']);
$this->marcus = $this->fixture('Class_Users',['id'=> 10,
'prenom' => 'Marcus',
'nom' => 'Miller',
'login' => 'mmiller' ,
'mail' => 'marcus@gmail.com',
'pseudo' => 'mimi',
'password' => 'mysecret',
'date_debut' => null,
'role' => 'abonne_sigb',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB,
'id_site' => 999,
'idabon' => '00123',
'fiche_SIGB' => ['type_comm' => 0]
]);
$this->marcus = $this->fixture('Class_Users',
['id'=> 10,
'prenom' => 'Marcus',
'nom' => 'Miller',
'login' => 'mmiller' ,
'mail' => 'marcus@gmail.com',
'pseudo' => 'mimi',
'password' => 'mysecret',
'date_debut' => null,
'role' => 'abonne_sigb',
'role_level' => ZendAfi_Acl_AdminControllerRoles::ABONNE_SIGB,
'id_site' => 999,
'idabon' => '00123',
'fiche_SIGB' => ['type_comm' => 0],
'disable_newsletter' => 0,
]);
ZendAfi_Auth::getInstance()->logUser($this->marcus);
......
......@@ -31,13 +31,13 @@ class RGPD_PatronDowloadDatasTest extends AbstractControllerTestCase {
['id' => 1,
'libelle' => 'Annecy',
]);
$this->fixture('Class_UserGroup',
['id' => 344,
'libelle' => 'allowed',
'rights' => [Class_UserGroup::RIGHT_DIRIGER_ACTIVITY,
Class_UserGroup::RIGHT_SUIVRE_ACTIVITY]]);
$this->fixture('Class_Users',
['id' => 1,
'nom' => 'Mentier',
......@@ -61,8 +61,10 @@ class RGPD_PatronDowloadDatasTest extends AbstractControllerTestCase {
'is_contact_mail' => false,
'ordreabon' => 1,
'id_site' => 1,
'user_groups' => [Class_UserGroup::find(344)]
'user_groups' => [Class_UserGroup::find(344)],
'disable_newsletter' => 0,
]);
$this->fixture('Class_Notice', ['id' => 34,
'titre_principal' => 'Millenium',
'clef_oeuvre' => 'MILLENIUM--LARSSON']);
......
......@@ -739,6 +739,7 @@ class TemplatesBreadcrumbTestDispatchSearchTest extends TemplatesIntonationTestC
'titre' => 'nouveautés',
'contenu' => 'test',
'mail_subject' => 'nouveautés']);
$this->dispatch('/opac/abonne/fiche/id_profil/72', true);
}
......
Markdown is supported
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