|
From: Marcus B. <ma...@la...> - 2004-03-10 23:54:17
|
Hi...
Thomas Purdy wrote:
> I have a function that logs in to the website and verifies that it is
> then passed to the welcome page. Next I would like to write a function
> that then checks the welcome page. I have them both in the same class
> php file. The problem is that on the second function I can not find the
> page. What do I need to do to be able to not have all my code in one
> big function?
class MyTest extends WebTestCase {
function MyTest() {
$this->WebTestCase();
}
function fetchLoginPage() {
// Fetch the page here.
// Submit to the next page.
}
function assessWelcomePage() {
// Check the welcome page here.
}
function testLoginSequence() {
$this->fetchLoginPage();
$this->assessWelcomePage();
}
}
Only methods that start with the string "test" are run automatically.
Other methods can be added to the class as you need.
> Thomas
>
yours, Marcus
--
Marcus Baker, ma...@la..., no...@ap...
|