From 6428b8fdc50e8d008774fa0dfa7062c42533e053 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 30 Apr 2006 22:32:32 +0000 Subject: [PATCH] Adding a separate config file --- docs/phpunit/AllTests.php | 1 + docs/phpunit/ApplicationControllerTest.php | 18 +++--------------- docs/phpunit/config.php | 6 ++++++ 3 files changed, 10 insertions(+), 15 deletions(-) create mode 100644 docs/phpunit/config.php diff --git a/docs/phpunit/AllTests.php b/docs/phpunit/AllTests.php index 5b4bc33..a17a182 100644 --- a/docs/phpunit/AllTests.php +++ b/docs/phpunit/AllTests.php @@ -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'); diff --git a/docs/phpunit/ApplicationControllerTest.php b/docs/phpunit/ApplicationControllerTest.php index fa51057..4fbcb15 100644 --- a/docs/phpunit/ApplicationControllerTest.php +++ b/docs/phpunit/ApplicationControllerTest.php @@ -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 index 0000000..f2dac5b --- /dev/null +++ b/docs/phpunit/config.php @@ -0,0 +1,6 @@ + \ No newline at end of file -- 2.22.5