Starting work on ApplicationController
[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 /**
28 * Repository path
29 * @var string
30 */
31 private $reposPath = 'file:///Server/htdocs/viewsvn/reposdir';
32
33 /**
34 * Binary path
35 * @var string
36 */
37 private $binaryPath = '/usr/local/bin/svn';
38
39 public function setUp()
40 {
41 $this->fixture = new ApplicationController($this->binaryPath, $this->reposPath);
42 }
43
44 // ###################################################################
45 /**
46 * Makes sure that when the controller is created the proper fields
47 * have been set.
48 */
49 public function testNewControllerFields()
50 {
51 throw new PHPUnit2_Framework_IncompleteTestError;
52 }
53
54 // ###################################################################
55 /**
56 * Checks that getRepositoryName() does not return empty.
57 */
58 public function testGetRepositoryName()
59 {
60 throw new PHPUnit2_Framework_IncompleteTestError;
61 }
62
63 // ###################################################################
64 /**
65 * Checks that getRepositoryUri() in the controller matches the one
66 * specified in the configuration.
67 */
68 public function testGetRepositoryUri()
69 {
70 $this->assertEquals($this->reposPath, $this->fixture->getRepositoryPath(), 'Repository path is empty');
71 $this->assertRegExp('#(.*)/$#', $this->fixture->getRepositoryPath(), 'Repository path does not end with a slash');
72 }
73
74 // ###################################################################
75 /**
76 * Checks that the command path to the SVN binary is not empty.
77 */
78 public function testGetSvnBinaryPath()
79 {
80 throw new PHPUnit2_Framework_IncompleteTestError;
81 }
82
83 // ###################################################################
84 /**
85 * Checks that the revision number is set when passed via HTTP_GET or
86 * HTTP_POST.
87 */
88 public function testHttpRequestedRevisionNumberSet()
89 {
90 throw new PHPUnit2_Framework_IncompleteTestError;
91 }
92
93 // ###################################################################
94 /**
95 * Checks that the revision number is set when no arguments are passed.
96 */
97 public function testUnRequestedRevisionNumberSet()
98 {
99 throw new PHPUnit2_Framework_IncompleteTestError;
100 }
101
102 // ###################################################################
103 /**
104 * Checks that the relative path always ends in a trailing slash if the
105 * active node is a directory.
106 */
107 public function testRelativePathEndsWithSlash()
108 {
109 throw new PHPUnit2_Framework_IncompleteTestError;
110 }
111
112 // ###################################################################
113 /**
114 * Checks that even without a HTTP request that a node is present.
115 */
116 public function testUnRequestedNodePresence()
117 {
118 throw new PHPUnit2_Framework_IncompleteTestError;
119 }
120
121 // ###################################################################
122 /**
123 * Checks the validity of a HTTP_GET requested node.
124 */
125 public function testHttpRequestedNodePresence()
126 {
127 throw new PHPUnit2_Framework_IncompleteTestError;
128 }
129
130 // ###################################################################
131 /**
132 * Verifies the ability to fetch an arbitrary node.
133 */
134 public function testFetchArbitraryNode()
135 {
136 throw new PHPUnit2_Framework_IncompleteTestError;
137 }
138 }
139
140 ?>