From a30245d83c46208c7d90e4fc70c8de7704acb9c3 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 30 Apr 2006 22:46:07 +0000 Subject: [PATCH] Fixes for ApplicationController --- docs/phpunit/ApplicationControllerTest.php | 3 ++- includes/ApplicationController.php | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/phpunit/ApplicationControllerTest.php b/docs/phpunit/ApplicationControllerTest.php index 4fbcb15..24c8065 100644 --- a/docs/phpunit/ApplicationControllerTest.php +++ b/docs/phpunit/ApplicationControllerTest.php @@ -5,6 +5,7 @@ require_once('PHPUnit2/Framework/IncompleteTestError.php'); require_once('PHPUnit2/Framework/TestCase.php'); // load piggy +require_once('./../../framework/kernel.php'); require_once('./../../includes/ApplicationController.php'); /** @@ -55,7 +56,7 @@ class ApplicationControllerTest extends PHPUnit2_Framework_TestCase */ public function testGetRepositoryUri() { - $this->assertEquals(APPLICATION_CONTROLLER_REPOS_PATH, $this->fixture->getRepositoryPath(), 'Repository path is empty'); + $this->assertFalse(in_array($this->fixture->getRepositoryPath(), array('', '/')), 'Repository path is empty'); $this->assertRegExp('#(.*)/$#', $this->fixture->getRepositoryPath(), 'Repository path does not end with a slash'); } diff --git a/includes/ApplicationController.php b/includes/ApplicationController.php index ee78a15..4a6bb4f 100644 --- a/includes/ApplicationController.php +++ b/includes/ApplicationController.php @@ -34,6 +34,12 @@ */ class ApplicationController { + /** + * ISSO instance + * @var object + */ + private $isso; + /** * Subversion binary path * @var string @@ -61,7 +67,9 @@ class ApplicationController */ public function __construct($binaryPath, $reposPath) { - $this->reposPath = $reposPath; + $this->isso = new ISSO; + + $this->reposPath = $this->isso->fetch_sourcepath($reposPath); $this->binaryPath = $binaryPath; } -- 2.43.5