Skip to content
Snippets Groups Projects

hotline#180601 : fix site access for Cvs2

Merged Alex Arnaud requested to merge hotline#180601_Add_site_access_to_Cvs2_followup into master
All threads resolved!
Compare and
3 files
+ 15
45
Preferences
Compare changes
Files
3
@@ -122,7 +122,7 @@ class Cvs2ActivatedAccessSiteSsoTestCase extends Cvs2ActivatedTestCase {
<time>1526288804</time>
<action>acces_site</action>
<data>
<url>https://rayonnages.mediatheques.fr/?ln=&amp;con=090021b6dae3bf74759e4e0e47f754af&amp;if=0</url>
<url>https://rayonnages.mediatheques.fr/album/135?ln=&amp;con=090021b6dae3bf74759e4e0e47f754af&amp;if=0</url>
<token>090021b6dae3bf74759e4e0e47f754af</token>
</data>
</response>');
@@ -133,10 +133,9 @@ class Cvs2ActivatedAccessSiteSsoTestCase extends Cvs2ActivatedTestCase {
/** @test */
public function shouldRedirectToCvs2() {
$this->dispatch('/modules/cvs2/123', true);
$this->dispatch('/modules/cvs2/album_id/123', true);
$this->assertXPathContentContains('//script',
'document.location.href="http://cvs-site.com',
$this->_response->getBody());
'document.location.href="https://rayonnages.mediatheques.fr/album/135');
}
}
@@ -302,32 +301,6 @@ class Cvs2ModuleMenuTest extends Cvs2ActivatedTestCase {
class Cvs2SsoTest extends Cvs2ActivatedTestCase {
public function setUp() {
parent::setUp();
ZendAfi_Auth::getInstance()->logUser($this->_user);
Class_AdminVar::set('Cvs2_CATALOG_URL','http://eureka.mediatheque.fr');
}
/** @test */
public function shouldRedirectToCvs2() {
$this->dispatch('/opac/modules/cvs2');
$this->assertXPathContentContains('//script',
'document.location.href="http://eureka.mediatheque.fr');
}
/** @test */
public function shouldRedirectToAlbum() {
$this->dispatch('/opac/modules/cvs2/album_id/123');
$this->assertXPathContentContains('//script',
'http://eureka.mediatheque.fr/album/135');
}
}
abstract class Cvs2SsoTestWithAccesDirectTestCase extends Cvs2ActivatedTestCase {
public function setUp() {
parent::setUp();