Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: http://svn.php.net/repository/pear/packages/File_HtAccess/trunk@224529 c90b9560-bf6c-de11-be94-00142212c4b1
- Loading branch information
Mika Tuupola
committed
Dec 7, 2006
1 parent
a5e74b4
commit 36007db
Showing
7 changed files
with
229 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--TEST-- | ||
File_HtAccess::load() | ||
--SKIPIF-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
?> | ||
--FILE-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
|
||
$fh = new File_HtAccess('htaccess01'); | ||
$fh->load(); | ||
print_r($fh); | ||
?> | ||
--GET-- | ||
--POST-- | ||
--EXPECT-- | ||
file_htaccess Object | ||
( | ||
[file] => htaccess01 | ||
[authname] => "Protected" | ||
[authtype] => Basic | ||
[authuserfile] => /usr/local/apache/conf/users.dat | ||
[authgroupfile] => | ||
[authdigestfile] => | ||
[authdigestgroupfile] => | ||
[require] => Array | ||
( | ||
[0] => valid-user | ||
) | ||
|
||
[additional] => Array | ||
( | ||
) | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--TEST-- | ||
File_HtAccess::load() | ||
--SKIPIF-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
?> | ||
--FILE-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
|
||
$fh = new File_HtAccess('htaccess02'); | ||
$fh->load(); | ||
print_r($fh); | ||
?> | ||
--GET-- | ||
--POST-- | ||
--EXPECT-- | ||
file_htaccess Object | ||
( | ||
[file] => htaccess02 | ||
[authname] => "Protected" | ||
[authtype] => Basic | ||
[authuserfile] => /usr/local/apache/conf/users.dat | ||
[authgroupfile] => | ||
[authdigestfile] => | ||
[authdigestgroupfile] => | ||
[require] => Array | ||
( | ||
[0] => user | ||
[1] => tuupola | ||
[2] => laane | ||
[3] => viemero | ||
) | ||
|
||
[additional] => Array | ||
( | ||
) | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--TEST-- | ||
File_HtAccess::load() | ||
--SKIPIF-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
?> | ||
--FILE-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
|
||
$fh = new File_HtAccess('htaccess03'); | ||
$fh->load(); | ||
print_r($fh); | ||
?> | ||
--GET-- | ||
--POST-- | ||
--EXPECT-- | ||
file_htaccess Object | ||
( | ||
[file] => htaccess03 | ||
[authname] => "Protected" | ||
[authtype] => Basic | ||
[authuserfile] => /usr/local/apache/conf/users.dat | ||
[authgroupfile] => | ||
[authdigestfile] => | ||
[authdigestgroupfile] => | ||
[require] => Array | ||
( | ||
[0] => user | ||
[1] => tuupola | ||
[2] => laane | ||
[3] => viemero | ||
) | ||
|
||
[additional] => Array | ||
( | ||
) | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--TEST-- | ||
File_HtAccess::getContent() | ||
--SKIPIF-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
?> | ||
--FILE-- | ||
<?php | ||
/* first one for cvs */ | ||
if (@include(dirname(__FILE__)."/../HtAccess.php")) { | ||
$status = ''; | ||
} else if (@include('DB/HtAccess.php')) { | ||
$status = ''; | ||
} else { | ||
$status = 'skip'; | ||
} | ||
print $status; | ||
|
||
$fh = new File_HtAccess('htaccess01'); | ||
$fh->load(); | ||
print $fh->getContent(); | ||
$fh = new File_HtAccess('htaccess02'); | ||
$fh->load(); | ||
print $fh->getContent(); | ||
$fh = new File_HtAccess('htaccess03'); | ||
$fh->load(); | ||
print $fh->getContent(); | ||
?> | ||
--GET-- | ||
--POST-- | ||
--EXPECT-- | ||
AuthName "Protected" | ||
AuthType Basic | ||
AuthUserFile /usr/local/apache/conf/users.dat | ||
Require valid-user | ||
|
||
AuthName "Protected" | ||
AuthType Basic | ||
AuthUserFile /usr/local/apache/conf/users.dat | ||
Require user tuupola laane viemero | ||
|
||
AuthName "Protected" | ||
AuthType Basic | ||
AuthUserFile /usr/local/apache/conf/users.dat | ||
Require user tuupola laane viemero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AuthName "Protected" | ||
AuthType Basic | ||
AuthUserFile /usr/local/apache/conf/users.dat | ||
require valid-user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
AuthName "Protected" | ||
AuthType Basic | ||
AuthUserFile /usr/local/apache/conf/users.dat | ||
require user tuupola laane viemero |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AuthName "Protected" | ||
AuthType Basic | ||
AuthUserFile /usr/local/apache/conf/users.dat | ||
require user tuupola | ||
require user laane | ||
require user viemero |