4 require_once('PHPUnit2/Framework/IncompleteTestError.php');
5 require_once('PHPUnit2/Framework/TestCase.php');
8 require_once('./../../framework/kernel.php');
9 require_once('./../../includes/ApplicationController.php');
12 * ApplicationController Test Suite
14 * @author Iris Studios, Inc.
15 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
17 * @package ViewSVN Tests
20 class ApplicationControllerTest
extends PHPUnit2_Framework_TestCase
23 * Internal fixture: an instance of ApplicationController
28 public function setUp()
30 $this->fixture
= new ApplicationController(APPLICATION_CONTROLLER_BINARY_PATH
, APPLICATION_CONTROLLER_REPOS_PATH
);
33 // ###################################################################
35 * Makes sure that when the controller is created the proper fields
38 public function testNewControllerFields()
40 throw new PHPUnit2_Framework_IncompleteTestError
;
43 // ###################################################################
45 * Checks that getRepositoryName() does not return empty.
47 public function testGetRepositoryName()
49 throw new PHPUnit2_Framework_IncompleteTestError
;
52 // ###################################################################
54 * Checks that getRepositoryUri() in the controller matches the one
55 * specified in the configuration.
57 public function testGetRepositoryUri()
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');
63 // ###################################################################
65 * Checks that the command path to the SVN binary is not empty.
67 public function testGetSvnBinaryPath()
69 $this->assertNotEquals('', $this->fixture
->getSvnPath(), 'SVN binary path is empty');
72 // ###################################################################
74 * Checks that the revision number is set when passed via HTTP_GET or
77 public function testHttpRequestedRevisionNumberSet()
79 throw new PHPUnit2_Framework_IncompleteTestError
;
82 // ###################################################################
84 * Checks that the revision number is set when no arguments are passed.
86 public function testUnRequestedRevisionNumberSet()
88 throw new PHPUnit2_Framework_IncompleteTestError
;
91 // ###################################################################
93 * Checks that the relative path always ends in a trailing slash if the
94 * active node is a directory.
96 public function testRelativePathEndsWithSlash()
98 throw new PHPUnit2_Framework_IncompleteTestError
;
101 // ###################################################################
103 * Checks that even without a HTTP request that a node is present.
105 public function testUnRequestedNodePresence()
107 throw new PHPUnit2_Framework_IncompleteTestError
;
110 // ###################################################################
112 * Checks the validity of a HTTP_GET requested node.
114 public function testHttpRequestedNodePresence()
116 throw new PHPUnit2_Framework_IncompleteTestError
;
119 // ###################################################################
121 * Verifies the ability to fetch an arbitrary node.
123 public function testFetchArbitraryNode()
125 throw new PHPUnit2_Framework_IncompleteTestError
;