Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
493 ddelon 1
<?php
2
// $Id: validator_error_test.php,v 1.1 2005-09-30 14:58:00 ddelon Exp $
3
 
4
require_once('simple_include.php');
5
require_once('calendar_include.php');
6
 
7
class TestOfValidationError extends UnitTestCase {
8
    var $vError;
9
    function TestOfValidationError() {
10
        $this->UnitTestCase('Test of Validation Error');
11
    }
12
    function setUp() {
13
        $this->vError = new Calendar_Validation_Error('foo',20,'bar');
14
    }
15
    function testGetUnit() {
16
        $this->assertEqual($this->vError->getUnit(),'foo');
17
    }
18
    function testGetValue() {
19
        $this->assertEqual($this->vError->getValue(),20);
20
    }
21
    function testGetMessage() {
22
        $this->assertEqual($this->vError->getMessage(),'bar');
23
    }
24
    function testToString() {
25
        $this->assertEqual($this->vError->toString(),'foo = 20 [bar]');
26
    }
27
}
28
 
29
if (!defined('TEST_RUNNING')) {
30
    define('TEST_RUNNING', true);
31
    $test = &new TestOfValidationError();
32
    $test->run(new HtmlReporter());
33
}
34
?>