Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
Regression test for bug #8735
3
--FILE--
4
<?php
5
set_include_path(dirname(dirname(__FILE__)) . ':' . get_include_path());
6
$datasrc = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'bug8735.passwd';
7
 
8
require_once 'PEAR.php';
9
require_once 'Auth.php';
10
 
11
$a = new Auth('File',
12
		array('file' => $datasrc,
13
			'type' => 'AuthBasic'),
14
		'displayLogin');
15
if (PEAR::isError($a)) {
16
	print $a->getMessage();
17
	exit;
18
}
19
 
20
$error = $a->removeUser('username');
21
if (PEAR::isError($error)) {
22
	print $error->getMessage();
23
	exit;
24
}
25
 
26
readfile($datasrc);
27
print "-- cut --\n";
28
 
29
$error = $a->addUser('username', 'password');
30
if (PEAR::isError($error) || $error === false) {
31
	print "Error happened when adding.\n";
32
	print $error->getMessage();
33
	exit;
34
}
35
 
36
readfile($datasrc);
37
 
38
$a->removeUser('username');
39
?>
40
--EXPECT--
41
test:fcfKBtvEwG4g.
42
-- cut --
43
test:fcfKBtvEwG4g.
44
username:{SHA}W6ph5Mm5Pz8GgiULbPgzG37mj9g=