diff --git a/library/digital_resources/LesYeuxDoc/tests/LesYeuxDocTest.php b/library/digital_resources/LesYeuxDoc/tests/LesYeuxDocTest.php index 8a78d77a7671c516ab3095e577c2f09102f54cca..9783ae592423ab70aef6b40948bda18a311629a3 100644 --- a/library/digital_resources/LesYeuxDoc/tests/LesYeuxDocTest.php +++ b/library/digital_resources/LesYeuxDoc/tests/LesYeuxDocTest.php @@ -302,19 +302,10 @@ class LesYeuDocModuleSsoTest extends AbstractControllerTestCase { public function shouldRedirectToLesYeuxDoc() { $this->fixtures->activate(); $this->fixtures->logValidUser(); + LesYeuxDoc_Config::setTimeSource(new TimeSourceForTest('2018-28-05 11:50:00')); $this->dispatch('/opac/modules/les-yeux-doc', true); - $this->assertXpathContentContains('//script', 'document.location.href="http://lesyeuxdoc.com?sso_id=afi' - . '&id=2345' - . '&id_encrypted='.hash('sha256', '2345pass') - . '&d='. hash('sha256', date('dmY').'pass') - . '&prenom=Jean' - . '&nom=Rouch' - . '&email='. urlencode('rouch@ethno.fr') - . '&dnaiss=1975-01-01' - . '&datout=2023-01-01' - . '&return_url=' . urlencode('https://lesyeuxdoc.fr') - - , $this->_response->getBody()); + $this->assertXpathContentContains('//script', + 'document.location.href="http://lesyeuxdoc.com?id=2345&id_encrypted=8043a43d11f8daccc5b1a0a5ccbadedd1a3edba6b551c0ca1abaf42e49a36158&d=d0f3e0faa0b2546ea784554bea817f2dcac68a0c5e658ce907af0711e6674e53&prenom=Jean&nom=Rouch&email=rouch%40ethno.fr&dnaiss=1975-01-01&datout=2023-01-01";'); } }