Fixes for ApplicationController
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 30 Apr 2006 22:46:07 +0000 (22:46 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 30 Apr 2006 22:46:07 +0000 (22:46 +0000)
docs/phpunit/ApplicationControllerTest.php
includes/ApplicationController.php

index 4fbcb155716a690d4d2b1e7344c970706b4dd30f..24c8065bd70540945453948a01a747464f239f4f 100644 (file)
@@ -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');
        }
        
index ee78a155f3b5915ab2d75baae29777c4e9ad8fea..4a6bb4f45ebb0e1ea7a4ae40bc3218c72023b73a 100644 (file)
 */
 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;
        }