From a1b490bd3f4de696ef5e483482e3858cc20842b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Burnichon?= Date: Wed, 25 Mar 2015 13:07:45 +0100 Subject: [PATCH] Slash is now accepted in redirects. --- tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php | 2 +- .../Core/Event/Subscriber/SessionManagerSubscriberTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php index a8f6d0696c..f137ad959b 100644 --- a/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php +++ b/tests/Alchemy/Tests/Phrasea/Controller/Prod/UploadTest.php @@ -102,7 +102,7 @@ class UploadTest extends \PhraseanetAuthenticatedWebTestCase $this->assertTrue($record->get_thumbnail()->is_physically_present()); $fields = $record->get_caption()->get_fields(['FileName']); $field = array_pop($fields); - $this->assertEquals($field->get_serialized_values(), 'KIKOO'); + $this->assertEquals('KIKOO.JPG', $field->get_serialized_values()); } } diff --git a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php index f26d731073..a57e9ac98e 100644 --- a/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php +++ b/tests/Alchemy/Tests/Phrasea/Core/Event/Subscriber/SessionManagerSubscriberTest.php @@ -32,7 +32,7 @@ class SessionManagerSubscriberTest extends \PhraseanetAuthenticatedWebTestCase $this->assertTrue($client->getResponse()->isRedirect()); $this->assertNotNUll($client->getResponse()->headers->get('x-phraseanet-end-session')); $this->assertNotNUll($client->getResponse()->headers->get('location')); - $this->assertEquals('/login?redirect=..%2Fprod', $client->getResponse()->headers->get('location')); + $this->assertRegExp('#/login\?redirect=..(?:%2F|/)prod#', $client->getResponse()->headers->get('location')); } public function testEndSessionXmlXhttpRequest() @@ -132,7 +132,7 @@ class SessionManagerSubscriberTest extends \PhraseanetAuthenticatedWebTestCase $this->assertTrue($client->getResponse()->isRedirect()); $this->assertNotNUll($client->getResponse()->headers->get('x-phraseanet-end-session')); $this->assertNotNUll($client->getResponse()->headers->get('location')); - $this->assertEquals('/login?redirect=..%2Fprod', $client->getResponse()->headers->get('location')); + $this->assertRegExp('#/login\?redirect=..(?:%2F|/)prod#', $client->getResponse()->headers->get('location')); } public function testEndSessionAuthenticatedWithOutdatedIdleXmlHttpRequest()