|
From: Marcus B. <ma...@la...> - 2004-03-29 21:10:23
|
Hi...
Culley Harrelson wrote:
> I am back to working with web tester. What is the status of user
> authentication? Working in CVS?
Yes. It will also be released as a Beta5 in a couple of days.
You can find some examples at the bottom of the test/live_tests.php file
in the checkout. Here is the gist...
class MyTest extends WebTestCase {
function MyTest() {
$this->WebTestCase();
}
function testProtectedLogin() {
$this->get('http://mysite.com/protected.html'); // 401
$this->authenticate('Me', 'Secret'); // 200
$this->assertWantedPattern('/Top secret/');
}
function testOneProtectedPageOnly() {
$this->get('http://Me:se...@my.../protected.html'); // 200
$this->assertWantedPattern('/Top secret/');
}
}
A realm is considered a directory. Once logged into a particular
directory, it will present the identity to subdirectories as well. If
you change out of that directory tree you have to log in again, but it
is smart enough to combine directories.
>
> culley
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|