Skip to content
Snippets Groups Projects
Commit 0fd62cad authored by efalcy's avatar efalcy
Browse files

#9489 : ArteVod ajout de la date de naissance et de la date de fin d'abonnement dans le SSO

parent 5f13bcab
No related merge requests found
......@@ -64,7 +64,8 @@ class Class_ArteVodLink extends Class_WebService_Abstract{
$params['prenom'] = $this->_user->getPrenom();
$params['nom'] = $this->_user->getNom();
$params['email'] = $this->_user->getMail();
$params['dnaiss'] = $this->_user->getNaissance();
$params['datout'] = $this->_user->getDateFin();
return $this->baseUrl().'?'.http_build_query(array_filter($params));
}
}
......
......@@ -74,7 +74,8 @@ class ArteVodLinkWithUserAndAlbumTest extends Storm_Test_ModelTestCase {
.'&d='. hash('sha256', date('dmY').'GOGO')
.'&prenom=James'
.'&nom=Bond'
.'&email='.urlencode('jbond@007.fr'),
.'&email='.urlencode('jbond@007.fr')
.'&datout=2023-09-12',
$this->_arte_vod_link->url());
}
......@@ -92,7 +93,8 @@ class ArteVodLinkWithUserAndAlbumTest extends Storm_Test_ModelTestCase {
.'?sso_id=afi'
.'&id=45'
.'&id_encrypted='. hash('sha256', '45secret')
.'&d='. hash('sha256', date('dmY').'secret'),
.'&d='. hash('sha256', date('dmY').'secret')
.'&datout=2023-09-12',
$this->_arte_vod_link->url());
}
......@@ -107,6 +109,7 @@ class ArteVodLinkWithUserAndAlbumTest extends Storm_Test_ModelTestCase {
->setNom('')
->setMail('')
->setIdabon('')
->setDateFin('')
->beInvite();
$this->assertEquals('http://www.mediatheque-numerique.com/films/entre-les-murs'
......@@ -118,7 +121,32 @@ class ArteVodLinkWithUserAndAlbumTest extends Storm_Test_ModelTestCase {
$this->_arte_vod_link->url());
}
/** @test */
public function userWithDateNaissanceShouldContainsDnaissInUrl() {
Class_AdminVar::newInstanceWithId('ARTE_VOD_SSO_KEY')->setValeur('secret');
$this->_james_bond
->setPrenom('')
->setNom('')
->setMail('')
->setDateFin('')
->setNaissance('1975-01-01');
$this->assertEquals('http://www.mediatheque-numerique.com/films/entre-les-murs'
.'?sso_id=afi'
.'&id=45'
.'&id_encrypted='. hash('sha256', '45secret')
.'&d='. hash('sha256', date('dmY').'secret')
.'&dnaiss=1975-01-01',
$this->_arte_vod_link->url());
}
}
?>
\ 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