0337d704 |
1 | <?php |
2 | require_once("__init__.php"); |
3 | require_once('include/platal/errors.inc.php'); |
4 | |
5 | class TestOfXOrgErrors extends UnitTestCase { |
6 | function TestOfXOrgErrors() { |
7 | $this->UnitTestCase('XOrgErrors Test'); |
8 | } |
9 | |
10 | function testCreatingXOrgErrors() { |
11 | $errors = new XOrgErrors(); |
12 | $this->assertIdentical($errors->errs, Array()); |
13 | $this->assertIdentical($errors->failure, false); |
14 | } |
15 | |
16 | function testTrig() { |
17 | $errors = new XOrgErrors(); |
18 | $errors->trig("Foo error"); |
19 | $this->assertIdentical($errors->errs, Array("Foo error")); |
20 | $this->assertIdentical($errors->failure, false); |
21 | } |
22 | |
23 | function testFail() { |
24 | $errors = new XOrgErrors(); |
25 | $errors->fail("Foo error"); |
26 | $this->assertIdentical($errors->errs, Array("Foo error")); |
27 | $this->assertIdentical($errors->failure, true); |
28 | } |
29 | } |
30 | |
31 | $test = &new TestOfXOrgErrors(); |
32 | $test->run($reporter); |
33 | ?> |