source: branches/version-2_5-dev/data/module/Calendar/tests/validator_error_test.php @ 20119

Revision 20119, 973 bytes checked in by nanasess, 13 years ago (diff)

module 以下は svn:keywords を除外

  • Property svn:eol-style set to LF
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2// $Id: validator_error_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $
3
4require_once('simple_include.php');
5require_once('calendar_include.php');
6
7class 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
29if (!defined('TEST_RUNNING')) {
30    define('TEST_RUNNING', true);
31    $test = &new TestOfValidationError();
32    $test->run(new HtmlReporter());
33}
34?>
Note: See TracBrowser for help on using the repository browser.