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