source: trunk/tests/ScriptTimerTest.php @ 1

Last change on this file since 1 was 1, checked in by scdev, 19 years ago

Initial import.

File size: 1.4 KB
Line 
1<?php
2/// FIXME: Tests not implemented.
3return;
4
5/**
6 * PHPUnit test case for ScriptTimer
7 *
8 * The method skeletons below need to be filled in with
9 * real data so that the tests will run correctly. Replace
10 * all EXPECTED_VAL and PARAM strings with real data.
11 *
12 * Created with PHPUnit_Skeleton on 2005-08-09
13 */
14require_once 'PHPUnit.php';
15class ScriptTimerTest extends PHPUnit_TestCase {
16
17    var $ScriptTimer;
18
19    function ScriptTimerTest($name)
20    {
21        $this->PHPUnit_TestCase($name);
22    }
23
24    function setUp()
25    {
26        require dirname(__FILE__) . '/_config.inc.php';
27        require_once '../lib/ScriptTimer.inc.php';
28        $this->ScriptTimer =& new ScriptTimer(PARAM);
29    }
30
31    function tearDown()
32    {
33        unset($this->ScriptTimer);
34    }
35
36    function test_start()
37    {
38        $result = $this->ScriptTimer->start(PARAM);
39        $expected = EXPECTED_VAL;
40        $this->assertEquals($expected, $result);
41    }
42
43    function test_stop()
44    {
45        $result = $this->ScriptTimer->stop(PARAM);
46        $expected = EXPECTED_VAL;
47        $this->assertEquals($expected, $result);
48    }
49
50    function test_gettime()
51    {
52        $result = $this->ScriptTimer->gettime(PARAM);
53        $expected = EXPECTED_VAL;
54        $this->assertEquals($expected, $result);
55    }
56
57}
58// Running the test.
59$suite = new PHPUnit_TestSuite('ScriptTimerTest');
60$result = PHPUnit::run($suite);
61echo $result->toString();
62?>
Note: See TracBrowser for help on using the repository browser.