Momentarily I try simple test. Unfortunately I have the straight following problem...
imprint.test.php
.
Code: Select all
<?php
require_once('simpletest/web_tester.php');
require_once('simpletest/reporter.php');
require_once('simpletest/url.php');
require_once('simpletest/unit_tester.php');
class ImprintTest extends WebTestCase {
function CheckImprintAccessibility() {
$browser = new SimpleBrowser();
$browser->addHeader('User-Agent: Firefox/2.0.0.2');
$this->get('http://www.domain.eu');
$this->clickLink('Imprint');
$this->assertText('Mail');
$this->assertPattern('/@/');
$this->assertLink('http//www.test.eu');
}
}
?>
and this one :
index.php
<?php
require_once('simpletest/unit_tester.php');
require_once('simpletest/web_tester.php');
require_once('simpletest/reporter.php');
class AllTests extends TestSuite {
function AllTests() {
$this->TestSuite('Testing');
$this->addTestFile('imprint.test.php');
// etc
}
}
$test = new AllTests();
$test->run(new HtmlReporter());
?>Why that does not function ? Where is the Problem ?
PS: Excuse me for my horrible english