Skip to content
Snippets Groups Projects
Commit 5460adb5 authored by efalcy's avatar efalcy
Browse files

Corrections tests

parent cc62cb06
Branches
Tags
No related merge requests found
......@@ -92,30 +92,28 @@ class ModulesMenuTest extends Storm_Test_ModelTestCase {
protected function _logUserGaston() {
$account = new stdClass();
$account->username = 'gaston';
$account->password = 'password';
$account->ID_USER = 34;
ZendAfi_Auth::getInstance()->getStorage()->write($account);
$this->group_multimedia = Class_UserGroup::newInstanceWithId('20', ['libelle' => 'Multimedia',
'rights_token' => Class_UserGroup::RIGHT_ACCES_ARTEVOD]);
return Class_Users::getLoader()
->newInstanceWithId(34)
$this->group_multimedia = $this->fixture('Class_UserGroup' , ['id' => '20',
'libelle' => 'Multimedia',
'rights_token' => Class_UserGroup::RIGHT_ACCES_ARTEVOD]);
$gaston = $this->fixture('Class_Users', ['id'=>34 ,'password' => 'toto' ,'login' => '34']);
$gaston
->setIdabon(34)
->setLogin(34)
->setNom('Lagaffe')
->setPrenom('Gaston')
->setPseudo('gaffe')
->setUserGroups([]);
->setUserGroups([])
->beInvite();
$gaston->save();
ZendAfi_Auth::getInstance()->logUser($gaston);
return $gaston;
}
/** @test */
public function vodeclicUrlWithUserLoggedShouldBeVodeclicSSO() {
$this->group_vodeclic = Class_UserGroup::newInstanceWithId('20', ['libelle' => 'Multimedia',
'rights_token' => Class_UserGroup::RIGHT_ACCES_VODECLIC]);
$this->group_vodeclic = $this->fixture('Class_UserGroup',['id' => '20',
'libelle' => 'Multimedia',
'rights_token' => Class_UserGroup::RIGHT_ACCES_VODECLIC]);
$this->_logUserGaston()
->beAbonneSIGB()
......@@ -170,7 +168,7 @@ class ModulesMenuTest extends Storm_Test_ModelTestCase {
public function vodeclicUrlWithAbonnementInvalidShouldBeJSAlertAbonnementInvalid() {
$this->_logUserGaston();
$vodeclic= new Class_Systeme_ModulesMenu_Vodeclic();
xdebug_break();
$url = $vodeclic->getDynamiqueUrl();
$this->assertContains('Votre abonnement est terminé', $vodeclic->getMessage());
......
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