From 64142de9743d8715de5cd09650715a5c5587e2c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaime=20Pe=CC=81rez?= <jaime.perez@uninett.no>
Date: Mon, 27 Jun 2016 18:18:40 +0200
Subject: [PATCH] tests: Fix CI build.

Now that we are using realpath() to try to obtain the URL relative to the base URL path of SSP, we need to use real scripts or realpath() will return an empty string.
---
 tests/lib/SimpleSAML/Utils/HTTPTest.php | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tests/lib/SimpleSAML/Utils/HTTPTest.php b/tests/lib/SimpleSAML/Utils/HTTPTest.php
index ff7e69f8b..92a022fe4 100644
--- a/tests/lib/SimpleSAML/Utils/HTTPTest.php
+++ b/tests/lib/SimpleSAML/Utils/HTTPTest.php
@@ -153,10 +153,10 @@ class HTTPTest extends \PHPUnit_Framework_TestCase
             'baseurlpath' => 'https://example.com/simplesaml/',
         ), '[ARRAY]', 'simplesaml');
         $baseDir = $cfg->getBaseDir();
-        $_SERVER['SCRIPT_FILENAME'] = $baseDir.'www/script.php';
-        $_SERVER['REQUEST_URI'] = '/simplesaml/script.php/module/file.php?foo=bar#something';
+        $_SERVER['SCRIPT_FILENAME'] = $baseDir.'www/module.php';
+        $_SERVER['REQUEST_URI'] = '/simplesaml/module.php/module/file.php?foo=bar#something';
         $this->assertEquals(
-            'https://example.com/simplesaml/script.php/module/file.php?foo=bar#something',
+            'https://example.com/simplesaml/module.php/module/file.php?foo=bar#something',
             HTTP::getSelfURL()
         );
 
@@ -165,7 +165,7 @@ class HTTPTest extends \PHPUnit_Framework_TestCase
             'baseurlpath' => 'https://example.com/simplesaml',
         ), '[ARRAY]', 'simplesaml');
         $this->assertEquals(
-            'https://example.com/simplesaml/script.php/module/file.php?foo=bar#something',
+            'https://example.com/simplesaml/module.php/module/file.php?foo=bar#something',
             HTTP::getSelfURL()
         );
 
@@ -174,7 +174,7 @@ class HTTPTest extends \PHPUnit_Framework_TestCase
             'baseurlpath' => 'https://example.com',
         ), '[ARRAY]', 'simplesaml');
         $this->assertEquals(
-            'https://example.com/script.php/module/file.php?foo=bar#something',
+            'https://example.com/module.php/module/file.php?foo=bar#something',
             HTTP::getSelfURL()
         );
 
@@ -186,7 +186,7 @@ class HTTPTest extends \PHPUnit_Framework_TestCase
         unset($_SERVER['HTTPS']);
         unset($_SERVER['SERVER_PORT']);
         $this->assertEquals(
-            'http://example.org/simplesaml/script.php/module/file.php?foo=bar#something',
+            'http://example.org/simplesaml/module.php/module/file.php?foo=bar#something',
             HTTP::getSelfURL()
         );
 
@@ -196,7 +196,7 @@ class HTTPTest extends \PHPUnit_Framework_TestCase
         ), '[ARRAY]', 'simplesaml');
         $_SERVER['SERVER_PORT'] = '8080';
         $this->assertEquals(
-            'http://example.org:8080/simplesaml/script.php/module/file.php?foo=bar#something',
+            'http://example.org:8080/simplesaml/module.php/module/file.php?foo=bar#something',
             HTTP::getSelfURL()
         );
 
@@ -206,7 +206,7 @@ class HTTPTest extends \PHPUnit_Framework_TestCase
         ), '[ARRAY]', 'simplesaml');
         $_SERVER['HTTPS'] = 'on';
         $this->assertEquals(
-            'https://example.org:8080/simplesaml/script.php/module/file.php?foo=bar#something',
+            'https://example.org:8080/simplesaml/module.php/module/file.php?foo=bar#something',
             HTTP::getSelfURL()
         );
 
-- 
GitLab