From c03d9fc89a33f6a6ef3740d70036961a627d04a2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 28 Jul 2016 10:39:05 +0200 Subject: php-onelogin-php-saml: import from Fedora --- php-saml-bootstrap-autoloader.patch | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 php-saml-bootstrap-autoloader.patch (limited to 'php-saml-bootstrap-autoloader.patch') diff --git a/php-saml-bootstrap-autoloader.patch b/php-saml-bootstrap-autoloader.patch new file mode 100644 index 0000000..baac69b --- /dev/null +++ b/php-saml-bootstrap-autoloader.patch @@ -0,0 +1,57 @@ +diff --git a/tests/bootstrap.php b/tests/bootstrap.php +index 4c27cc8..c73448f 100644 +--- a/tests/bootstrap.php ++++ b/tests/bootstrap.php +@@ -4,20 +4,11 @@ ob_start(); + + $basePath = dirname(dirname(__FILE__)); + +-require_once $basePath.'/_toolkit_loader.php'; ++require_once $basePath.'/lib/Saml2/autoload.php'; ++ + + if (!defined('TEST_ROOT')) define('TEST_ROOT', dirname(__FILE__)); + +-if (!defined('XMLSECLIBS_DIR')) define('XMLSECLIBS_DIR', $basePath.'/extlib/xmlseclibs/'); +-require_once XMLSECLIBS_DIR . 'xmlseclibs.php'; +- +-if (!defined('ONELOGIN_SAML_DIR')) define('ONELOGIN_SAML_DIR', $basePath.'/lib/Saml/'); +-require_once ONELOGIN_SAML_DIR . 'AuthRequest.php'; +-require_once ONELOGIN_SAML_DIR . 'Response.php'; +-require_once ONELOGIN_SAML_DIR . 'Settings.php'; +-require_once ONELOGIN_SAML_DIR . 'Metadata.php'; +-require_once ONELOGIN_SAML_DIR . 'XmlSec.php'; +- + if (!defined('ONELOGIN_CUSTOMPATH')) { + define('ONELOGIN_CUSTOMPATH', dirname(__FILE__).'/data/customPath/'); + } +@@ -29,12 +20,12 @@ if (!function_exists('getUrlFromRedirect')) { + /** + * In phpunit when a redirect is executed an Excepion raise, + * this funcion Get the target URL of the redirection +- * ++ * + * @param array $trace Trace of the Stack when an Exception raised + * + * @return string $targeturl Target url of the redirection + */ +- function getUrlFromRedirect($trace) ++ function getUrlFromRedirect($trace) + { + $param_args = $trace[0]['args'][4]; + $targeturl = $param_args['url']; +@@ -45,12 +36,12 @@ if (!function_exists('getUrlFromRedirect')) { + if (!function_exists('getParamsFromUrl')) { + /** + * Parsed the Query parameters of an URL. +- * ++ * + * @param string $url The URL + * + * @return array $parsedQuery Parsed query of the url + */ +- function getParamsFromUrl($url) ++ function getParamsFromUrl($url) + { + $parsedUrl = parse_url($url); + $query = $parsedUrl['query']; -- cgit