4 require_once('PHPUnit2/Framework/IncompleteTestError.php');
5 require_once('PHPUnit2/Framework/TestCase.php');
8 require_once('./../../includes/ApplicationController.php');
11 * ApplicationController Test Suite
13 * @author Iris Studios, Inc.
14 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
16 * @package ViewSVN Tests
19 class ApplicationControllerTest
extends PHPUnit2_Framework_TestCase
22 * Internal fixture: an instance of ApplicationController
31 private $reposPath = 'file:///Server/htdocs/viewsvn/reposdir';
37 private $binaryPath = '/usr/local/bin/svn';
39 public function setUp()
41 $this->fixture
= new ApplicationController($this->binaryPath
, $this->reposPath
);
44 // ###################################################################
46 * Makes sure that when the controller is created the proper fields
49 public function testNewControllerFields()
51 throw new PHPUnit2_Framework_IncompleteTestError
;
54 // ###################################################################
56 * Checks that getRepositoryName() does not return empty.
58 public function testGetRepositoryName()
60 throw new PHPUnit2_Framework_IncompleteTestError
;
63 // ###################################################################
65 * Checks that getRepositoryUri() in the controller matches the one
66 * specified in the configuration.
68 public function testGetRepositoryUri()
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');
74 // ###################################################################
76 * Checks that the command path to the SVN binary is not empty.
78 public function testGetSvnBinaryPath()
80 throw new PHPUnit2_Framework_IncompleteTestError
;
83 // ###################################################################
85 * Checks that the revision number is set when passed via HTTP_GET or
88 public function testHttpRequestedRevisionNumberSet()
90 throw new PHPUnit2_Framework_IncompleteTestError
;
93 // ###################################################################
95 * Checks that the revision number is set when no arguments are passed.
97 public function testUnRequestedRevisionNumberSet()
99 throw new PHPUnit2_Framework_IncompleteTestError
;
102 // ###################################################################
104 * Checks that the relative path always ends in a trailing slash if the
105 * active node is a directory.
107 public function testRelativePathEndsWithSlash()
109 throw new PHPUnit2_Framework_IncompleteTestError
;
112 // ###################################################################
114 * Checks that even without a HTTP request that a node is present.
116 public function testUnRequestedNodePresence()
118 throw new PHPUnit2_Framework_IncompleteTestError
;
121 // ###################################################################
123 * Checks the validity of a HTTP_GET requested node.
125 public function testHttpRequestedNodePresence()
127 throw new PHPUnit2_Framework_IncompleteTestError
;
130 // ###################################################################
132 * Verifies the ability to fetch an arbitrary node.
134 public function testFetchArbitraryNode()
136 throw new PHPUnit2_Framework_IncompleteTestError
;