Changeset 202 for trunk/tests
- Timestamp:
- Jul 13, 2006 11:24:01 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/NavTest.php
r42 r202 4 4 5 5 /** 6 * PHPUnit test case for Nav 6 * PHPUnit test case for Navigation 7 7 * 8 8 * The method skeletons below need to be filled in with … … 13 13 */ 14 14 require_once 'PHPUnit.php'; 15 class Nav Test extends PHPUnit_TestCase {15 class NavigationTest extends PHPUnit_TestCase { 16 16 17 var $Nav ;17 var $Navigation; 18 18 19 function Nav Test($name)19 function NavigationTest($name) 20 20 { 21 21 $this->PHPUnit_TestCase($name); … … 25 25 { 26 26 require dirname(__FILE__) . '/_config.inc.php'; 27 require_once '../lib/Nav .inc.php';28 $this->Nav =& new Nav(PARAM);27 require_once '../lib/Navigation.inc.php'; 28 $this->Navigation =& new Navigation(PARAM); 29 29 } 30 30 31 31 function tearDown() 32 32 { 33 unset($this->Nav );33 unset($this->Navigation); 34 34 } 35 35 36 36 function test_addpage() 37 37 { 38 $result = $this->Nav ->addpage(PARAM);38 $result = $this->Navigation->addpage(PARAM); 39 39 $expected = EXPECTED_VAL; 40 40 $this->assertEquals($expected, $result); … … 43 43 function test_setfeature() 44 44 { 45 $result = $this->Nav ->setfeature(PARAM);45 $result = $this->Navigation->setfeature(PARAM); 46 46 $expected = EXPECTED_VAL; 47 47 $this->assertEquals($expected, $result); … … 50 50 function test_clearpath() 51 51 { 52 $result = $this->Nav ->clearpath(PARAM);52 $result = $this->Navigation->clearpath(PARAM); 53 53 $expected = EXPECTED_VAL; 54 54 $this->assertEquals($expected, $result); … … 57 57 function test_getfeature() 58 58 { 59 $result = $this->Nav ->getfeature(PARAM);59 $result = $this->Navigation->getfeature(PARAM); 60 60 $expected = EXPECTED_VAL; 61 61 $this->assertEquals($expected, $result); … … 64 64 function test_gettitle() 65 65 { 66 $result = $this->Nav ->gettitle(PARAM);66 $result = $this->Navigation->gettitle(PARAM); 67 67 $expected = EXPECTED_VAL; 68 68 $this->assertEquals($expected, $result); … … 71 71 function test_printtitle() 72 72 { 73 $result = $this->Nav ->printtitle(PARAM);73 $result = $this->Navigation->printtitle(PARAM); 74 74 $expected = EXPECTED_VAL; 75 75 $this->assertEquals($expected, $result); … … 78 78 function test_getpath() 79 79 { 80 $result = $this->Nav ->getpath(PARAM);80 $result = $this->Navigation->getpath(PARAM); 81 81 $expected = EXPECTED_VAL; 82 82 $this->assertEquals($expected, $result); … … 85 85 function test_printpath() 86 86 { 87 $result = $this->Nav ->printpath(PARAM);87 $result = $this->Navigation->printpath(PARAM); 88 88 $expected = EXPECTED_VAL; 89 89 $this->assertEquals($expected, $result); … … 92 92 function test_getbreadcrumbs() 93 93 { 94 $result = $this->Nav ->getbreadcrumbs(PARAM);94 $result = $this->Navigation->getbreadcrumbs(PARAM); 95 95 $expected = EXPECTED_VAL; 96 96 $this->assertEquals($expected, $result); … … 99 99 function test_printbreadcrumbs() 100 100 { 101 $result = $this->Nav ->printbreadcrumbs(PARAM);101 $result = $this->Navigation->printbreadcrumbs(PARAM); 102 102 $expected = EXPECTED_VAL; 103 103 $this->assertEquals($expected, $result); … … 106 106 function test_currentpage() 107 107 { 108 $result = $this->Nav ->currentpage(PARAM);108 $result = $this->Navigation->currentpage(PARAM); 109 109 $expected = EXPECTED_VAL; 110 110 $this->assertEquals($expected, $result); … … 113 113 } 114 114 // Running the test. 115 $suite = new PHPUnit_TestSuite('Nav Test');115 $suite = new PHPUnit_TestSuite('NavigationTest'); 116 116 $result = PHPUnit::run($suite); 117 117 echo $result->toString();
Note: See TracChangeset
for help on using the changeset viewer.