Changeset 4060
- Timestamp:
- 03/21/08 04:07:44 (16 months ago)
- Location:
- branches/0.10
- Files:
-
- 3 modified
-
lib/Doctrine/Connection.php (modified) (1 diff)
-
lib/Doctrine/Manager.php (modified) (3 diffs)
-
tests/ManagerTestCase.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.10/lib/Doctrine/Connection.php
r4037 r4060 215 215 216 216 /** 217 * getOptions 218 * 219 * Get array of all options 220 * 221 * @return void 222 */ 223 public function getOptions() 224 { 225 return $this->options; 226 } 227 228 /** 217 229 * getOption 218 230 * -
branches/0.10/lib/Doctrine/Manager.php
r4028 r4060 149 149 /** 150 150 * getQueryRegistry 151 * 151 152 * lazy-initializes the query registry object and returns it 152 153 * … … 155 156 public function getQueryRegistry() 156 157 { 157 if ( ! isset($this->_queryRegistry)) {158 $this->_queryRegistry = new Doctrine_Query_Registry;159 }158 if ( ! isset($this->_queryRegistry)) { 159 $this->_queryRegistry = new Doctrine_Query_Registry; 160 } 160 161 return $this->_queryRegistry; 161 162 } … … 276 277 $driverName = $parts['scheme']; 277 278 $adapter = $parts; 279 } 280 281 if ( ! is_object($adapter)) { 282 $adapter['user'] = urldecode($adapter['user']); 283 $adapter['pass'] = urldecode($adapter['pass']); 284 $adapter['query'] = urldecode($adapter['query']); 285 $adapter['database'] = urldecode($adapter['database']); 286 $adapter['dsn'] = urldecode($adapter['dsn']); 278 287 } 279 288 -
branches/0.10/tests/ManagerTestCase.php
r4044 r4060 161 161 } 162 162 163 public function testConnectionInformationDecoded() 164 { 165 $dsn = 'mysql://' . urlencode('test/t') . ':' . urlencode('p@ssword') . '@localhost/' . urlencode('db/name'); 166 167 $conn = Doctrine_Manager::connection($dsn); 168 $options = $conn->getOptions(); 169 170 $this->assertEqual($options['username'], 'test/t'); 171 $this->assertEqual($options['password'], 'p@ssword'); 172 $this->assertEqual($options['dsn'], 'mysql:host=localhost;dbname=db/name'); 173 } 163 174 public function prepareData() { } 164 175 public function prepareTables() { }