Adding a separate config file
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 30 Apr 2006 22:32:32 +0000 (22:32 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 30 Apr 2006 22:32:32 +0000 (22:32 +0000)
docs/phpunit/AllTests.php
docs/phpunit/ApplicationControllerTest.php
docs/phpunit/config.php [new file with mode: 0644]

index 5b4bc338161e6d7bfae7942c765970daa93da4d8..a17a1822630a6280147b5b6faee33a4c26be0554 100644 (file)
@@ -6,6 +6,7 @@ require_once('PHPUnit2/Framework/TestSuite.php');
 require_once('PHPUnit2/Framework/Warning.php');
 require_once('PHPUnit2/Framework/IncompleteTestError.php');
 
+require_once('config.php');
 require_once('/Server/htdocs/tools/ISI_PHPUnit2_Output_HTML_Listener.php');
 require_once('PHPUnit2/TextUI/ResultPrinter.php');
 
index fa5105720d5c94f38f3db62c207db84de4b2eca5..4fbcb155716a690d4d2b1e7344c970706b4dd30f 100644 (file)
@@ -23,22 +23,10 @@ class ApplicationControllerTest extends PHPUnit2_Framework_TestCase
        * @var  object
        */
        protected $fixture;
-       
-       /**
-       * Repository path
-       * @var  string
-       */
-       private $reposPath = 'file:///Server/htdocs/viewsvn/reposdir';
-       
-       /**
-       * Binary path
-       * @var  string
-       */
-       private $binaryPath = '/usr/local/bin/svn';
-       
+
        public function setUp()
        {
-               $this->fixture = new ApplicationController($this->binaryPath, $this->reposPath);
+               $this->fixture = new ApplicationController(APPLICATION_CONTROLLER_BINARY_PATH, APPLICATION_CONTROLLER_REPOS_PATH);
        }
        
        // ###################################################################
@@ -67,7 +55,7 @@ class ApplicationControllerTest extends PHPUnit2_Framework_TestCase
        */
        public function testGetRepositoryUri()
        {
-               $this->assertEquals($this->reposPath, $this->fixture->getRepositoryPath(), 'Repository path is empty');
+               $this->assertEquals(APPLICATION_CONTROLLER_REPOS_PATH, $this->fixture->getRepositoryPath(), 'Repository path is empty');
                $this->assertRegExp('#(.*)/$#', $this->fixture->getRepositoryPath(), 'Repository path does not end with a slash');
        }
        
diff --git a/docs/phpunit/config.php b/docs/phpunit/config.php
new file mode 100644 (file)
index 0000000..f2dac5b
--- /dev/null
@@ -0,0 +1,6 @@
+<?php
+
+define('APPLICATION_CONTROLLER_BINARY_PATH', '/usr/local/bin/svn');
+define('APPLICATION_CONTROLLER_REPOS_PATH', 'file:///Server/htdocs/viewsvn/reposdir');
+
+?>
\ No newline at end of file