summaryrefslogtreecommitdiffstats
path: root/bindings/php5/tests
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2008-04-29 12:05:12 +0000
committerFrederic Peters <fpeters@entrouvert.com>2008-04-29 12:05:12 +0000
commit0ac403922ffc4126f21e48dddd0c38076257ca74 (patch)
tree158c308e82073bc4ce782d397f45092d331dd05b /bindings/php5/tests
parent62b71580574c634b7e8bac0a4b3105db1a9a2538 (diff)
downloadlasso-0ac403922ffc4126f21e48dddd0c38076257ca74.tar.gz
lasso-0ac403922ffc4126f21e48dddd0c38076257ca74.tar.xz
lasso-0ac403922ffc4126f21e48dddd0c38076257ca74.zip
[project @ fpeters@0d.be-20071113015838-961yf93m001amgi1]
merging Damien branch Original author: Frederic Peters <fpeters@0d.be> Date: 2007-11-13 02:58:38.825000+01:00
Diffstat (limited to 'bindings/php5/tests')
-rwxr-xr-xbindings/php5/tests/binding_tests.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/bindings/php5/tests/binding_tests.php b/bindings/php5/tests/binding_tests.php
index 1a2d999d..e9e48401 100755
--- a/bindings/php5/tests/binding_tests.php
+++ b/bindings/php5/tests/binding_tests.php
@@ -43,7 +43,46 @@ function test01() {
echo "OK.\n";
}
+function test02() {
+ echo "Get and set a GList of strings... ";
+
+ $requestAuthnContext = new LassoLibRequestAuthnContext();
+ $requestAuthnContext->authnContextClassRef = array(LASSO_LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD);
+ assert(! is_null($requestAuthnContext->authnContextClassRef));
+ assert(sizeof($requestAuthnContext->authnContextClassRef) == 1);
+ assert($requestAuthnContext->authnContextClassRef[0] == LASSO_LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD);
+
+ echo "OK.\n";
+}
+
+function test03() {
+ echo "Get and set 'providers' attribute (hashtable) of a server object... ";
+
+ $server = new LassoServer(
+ DATA_DIR . "sp1-la/metadata.xml",
+ DATA_DIR . "sp1-la/private-key-raw.pem",
+ NULL,
+ DATA_DIR . "sp1-la/certificate.pem");
+ $server->addProvider(
+ LASSO_PROVIDER_ROLE_IDP,
+ DATA_DIR . "idp1-la/metadata.xml",
+ DATA_DIR . "idp1-la/public-key.pem",
+ DATA_DIR . "idp1-la/certificate.pem");
+ assert(!is_null($server->providers));
+ assert($server->providers["https://idp1/metadata"]->providerId == "https://idp1/metadata");
+ $tmp_providers = $server->providers;
+ $server->providers = NULL;
+ assert(!$server->providers);
+ $server->providers = $tmp_providers;
+ assert($server->providers["https://idp1/metadata"]->providerId == "https://idp1/metadata");
+
+ echo "OK.\n";
+}
+
+
lasso_init();
test01();
+test02();
+test03();
lasso_shutdown();