Adding a separate config file
[viewsvn.git] / docs / phpunit / ApplicationControllerTest.php
1 <?php
2
3 // load test harness
4 require_once('PHPUnit2/Framework/IncompleteTestError.php');
5 require_once('PHPUnit2/Framework/TestCase.php');
6
7 // load piggy
8 require_once('./../../includes/ApplicationController.php');
9
10 /**
11 * ApplicationController Test Suite
12 *
13 * @author Iris Studios, Inc.
14 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
15 * @version $Revision$
16 * @package ViewSVN Tests
17 *
18 */
19 class ApplicationControllerTest extends PHPUnit2_Framework_TestCase
20 {
21 /**
22 * Internal fixture: an instance of ApplicationController
23 * @var object
24 */
25 protected $fixture;
26
27 public function setUp()
28 {
29 $this->fixture = new ApplicationController(APPLICATION_CONTROLLER_BINARY_PATH, APPLICATION_CONTROLLER_REPOS_PATH);
30 }
31
32 // ###################################################################
33 /**
34 * Makes sure that when the controller is created the proper fields
35 * have been set.
36 */
37 public function testNewControllerFields()
38 {
39 throw new PHPUnit2_Framework_IncompleteTestError;
40 }
41
42 // ###################################################################
43 /**
44 * Checks that getRepositoryName() does not return empty.
45 */
46 public function testGetRepositoryName()
47 {
48 throw new PHPUnit2_Framework_IncompleteTestError;
49 }
50
51 // ###################################################################
52 /**
53 * Checks that getRepositoryUri() in the controller matches the one
54 * specified in the configuration.
55 */
56 public function testGetRepositoryUri()
57 {
58 $this->assertEquals(APPLICATION_CONTROLLER_REPOS_PATH, $this->fixture->getRepositoryPath(), 'Repository path is empty');
59 $this->assertRegExp('#(.*)/$#', $this->fixture->getRepositoryPath(), 'Repository path does not end with a slash');
60 }
61
62 // ###################################################################
63 /**
64 * Checks that the command path to the SVN binary is not empty.
65 */
66 public function testGetSvnBinaryPath()
67 {
68 throw new PHPUnit2_Framework_IncompleteTestError;
69 }
70
71 // ###################################################################
72 /**
73 * Checks that the revision number is set when passed via HTTP_GET or
74 * HTTP_POST.
75 */
76 public function testHttpRequestedRevisionNumberSet()
77 {
78 throw new PHPUnit2_Framework_IncompleteTestError;
79 }
80
81 // ###################################################################
82 /**
83 * Checks that the revision number is set when no arguments are passed.
84 */
85 public function testUnRequestedRevisionNumberSet()
86 {
87 throw new PHPUnit2_Framework_IncompleteTestError;
88 }
89
90 // ###################################################################
91 /**
92 * Checks that the relative path always ends in a trailing slash if the
93 * active node is a directory.
94 */
95 public function testRelativePathEndsWithSlash()
96 {
97 throw new PHPUnit2_Framework_IncompleteTestError;
98 }
99
100 // ###################################################################
101 /**
102 * Checks that even without a HTTP request that a node is present.
103 */
104 public function testUnRequestedNodePresence()
105 {
106 throw new PHPUnit2_Framework_IncompleteTestError;
107 }
108
109 // ###################################################################
110 /**
111 * Checks the validity of a HTTP_GET requested node.
112 */
113 public function testHttpRequestedNodePresence()
114 {
115 throw new PHPUnit2_Framework_IncompleteTestError;
116 }
117
118 // ###################################################################
119 /**
120 * Verifies the ability to fetch an arbitrary node.
121 */
122 public function testFetchArbitraryNode()
123 {
124 throw new PHPUnit2_Framework_IncompleteTestError;
125 }
126 }
127
128 ?>