Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
d4083071
Commit
d4083071
authored
9 years ago
by
Jaime Perez Crespo
Browse files
Options
Downloads
Patches
Plain Diff
Move Utils_ConfigTest to SimpleSAML\Test\Utils\ConfigTest.
parent
b5c12019
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/lib/SimpleSAML/Utils/ConfigTest.php
+10
-4
10 additions, 4 deletions
tests/lib/SimpleSAML/Utils/ConfigTest.php
with
10 additions
and
4 deletions
tests/lib/SimpleSAML/Utils/ConfigTest.php
+
10
−
4
View file @
d4083071
<?php
<?php
namespace
SimpleSAML\Test\Utils
;
use
SimpleSAML\Utils\Config
;
/**
/**
* Tests for SimpleSAML\Utils\Config
* Tests for SimpleSAML\Utils\Config
*/
*/
class
Utils_
ConfigTest
extends
PHPUnit_Framework_TestCase
class
ConfigTest
extends
\
PHPUnit_Framework_TestCase
{
{
/**
/**
...
@@ -13,22 +17,24 @@ class Utils_ConfigTest extends PHPUnit_Framework_TestCase
...
@@ -13,22 +17,24 @@ class Utils_ConfigTest extends PHPUnit_Framework_TestCase
{
{
// clear env var
// clear env var
putenv
(
'SIMPLESAMLPHP_CONFIG_DIR'
);
putenv
(
'SIMPLESAMLPHP_CONFIG_DIR'
);
$configDir
=
\SimpleSAML\Utils\
Config
::
getConfigDir
();
$configDir
=
Config
::
getConfigDir
();
$this
->
assertEquals
(
$configDir
,
dirname
(
dirname
(
dirname
(
dirname
(
__DIR__
))))
.
'/config'
);
$this
->
assertEquals
(
$configDir
,
dirname
(
dirname
(
dirname
(
dirname
(
__DIR__
))))
.
'/config'
);
}
}
/**
/**
* Test valid dir specified by env var overrides default config dir
* Test valid dir specified by env var overrides default config dir
*/
*/
public
function
testEnvVariableConfigDir
()
public
function
testEnvVariableConfigDir
()
{
{
putenv
(
'SIMPLESAMLPHP_CONFIG_DIR='
.
__DIR__
);
putenv
(
'SIMPLESAMLPHP_CONFIG_DIR='
.
__DIR__
);
$configDir
=
\SimpleSAML\Utils\
Config
::
getConfigDir
();
$configDir
=
Config
::
getConfigDir
();
$this
->
assertEquals
(
$configDir
,
__DIR__
);
$this
->
assertEquals
(
$configDir
,
__DIR__
);
}
}
/**
/**
* Test invalid dir specified by env var results in a thrown exception
* Test invalid dir specified by env var results in a thrown exception
*/
*/
...
@@ -44,6 +50,6 @@ class Utils_ConfigTest extends PHPUnit_Framework_TestCase
...
@@ -44,6 +50,6 @@ class Utils_ConfigTest extends PHPUnit_Framework_TestCase
'Given: "'
.
$invalidDir
.
'"'
'Given: "'
.
$invalidDir
.
'"'
);
);
\SimpleSAML\Utils\
Config
::
getConfigDir
();
Config
::
getConfigDir
();
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment