From d13e41bbcf37a1048e0e4708b47485a2d1be3e29 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 9 Jul 2009 09:25:39 +0000
Subject: [PATCH] ldapstatus: Update to match new Feide code.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1555 44740490-163a-0410-bde0-09ae8108e29a
---
 .../lib/Auth/Backend/Test/StandardLDAPTest.php   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php b/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php
index 7e420604a..56b524365 100755
--- a/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php
+++ b/modules/ldapstatus/lib/Auth/Backend/Test/StandardLDAPTest.php
@@ -122,7 +122,7 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 			try {
 				$tester->tick('adminBind');
 		
-				$this->adminBind($this->location->getString('adminUser'), $this->location->getString('adminPassword'));
+				$this->adminBind();
 				$result['adminBind'] = array(TRUE,$tester->tack('connect'));
 				$result['adminBind']['time'] = $tester->tack('connect', FALSE); 
 				
@@ -178,7 +178,8 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 			try {
 				$tester->tick('ldapSearchTestUser');
 				
-				$userDN = $this->searchForUser($this->location->getValue('testUser')); 
+				$testUser = $this->location->getString('testUser');
+				$userDN = $this->searchForUser($testUser);
 				$result['ldapSearchTestUser'] = array(TRUE,$tester->tack('ldapSearchTestUser'));
 				$result['ldapSearchTestUser']['time'] = $tester->tack('ldapSearchTestUser', FALSE); 
 				
@@ -210,9 +211,9 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 			
 			$tester->tick('ldapBindTestUser');
 			try {
-				if ($attributes = $this->userBind(
-						$userDN, 
-						$this->location->getValue('testPassword') )) {
+				$this->userBind($testUser, $userDN, $this->location->getValue('testPassword'));
+				$attributes = $this->getAttributes($userDN);
+				if ($attributes) {
 					$result['ldapBindTestUser'] = array(TRUE,$tester->tack('ldapBindTestUser'));
 					$result['ldapBindTestUser']['time'] = $tester->tack('ldapBindTestUser', FALSE); 
 				} else {
@@ -233,9 +234,8 @@ class sspmod_ldapstatus_Auth_Backend_Test_StandardLDAPTest extends sspmod_feide_
 				$tester->tick('getTestOrg');
 
 				// Get organization and organizationUnit data.
-				$this->getOrg($attributes, $this->location->getValue('testUser'));
-				$this->getOrgUnits($attributes, $this->location->getValue('testUser'));
-				#echo('<pre>'); print_r($attributes); exit;
+				$attributes = $this->addOrgAttributes($attributes);
+
 				$result['getTestOrg'] = array(TRUE,$tester->tack('getTestOrg'));
 				$result['getTestOrg']['time'] = $tester->tack('getTestOrg', FALSE); 
 			} catch(Exception $e) {
-- 
GitLab