2 require_once("__init__.php");
3 require_once('include/platal/errors.inc.php');
5 class TestOfXOrgErrors
extends UnitTestCase
{
6 function TestOfXOrgErrors() {
7 $this->UnitTestCase('XOrgErrors Test');
10 function testCreatingXOrgErrors() {
11 $errors = new XOrgErrors();
12 $this->assertIdentical($errors->errs
, Array());
13 $this->assertIdentical($errors->failure
, false
);
17 $errors = new XOrgErrors();
18 $errors->trig("Foo error");
19 $this->assertIdentical($errors->errs
, Array("Foo error"));
20 $this->assertIdentical($errors->failure
, false
);
24 $errors = new XOrgErrors();
25 $errors->fail("Foo error");
26 $this->assertIdentical($errors->errs
, Array("Foo error"));
27 $this->assertIdentical($errors->failure
, true
);
31 $test = &new TestOfXOrgErrors();
32 $test->run($reporter);