Changeset 400
- Timestamp:
- 03/18/07 20:39:30 (1 year ago)
- Files:
-
- trunk/build.xml (modified) (1 diff)
- trunk/build/stubbles/build.xml (modified) (3 diffs)
- trunk/config/xml/rdbms.xml (modified) (1 diff)
- trunk/src/main/php/net/stubbles/rdbms/stubDatabaseConnectionData.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/rdbms/stubDatabaseConnectionPool.php (modified) (5 diffs)
- trunk/src/main/php/net/stubbles/util/log/stubFileLogAppender.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/log/stubLogger.php (modified) (2 diffs)
- trunk/src/test/php/net/stubbles/integration (added)
- trunk/src/test/php/net/stubbles/integration/DatabaseTestCase.php (added)
- trunk/src/test/php/net/stubbles/integration/LoggerTestCase.php (added)
- trunk/src/test/php/net/stubbles/integration/ProcessorTestCase.php (added)
- trunk/src/test/php/net/stubbles/integration/RegistryTestCase.php (added)
- trunk/src/test/php/net/stubbles/integration/VariantManagerTestCase.php (added)
- trunk/src/test/php/net/stubbles/rdbms/stubDatabaseConnectionDataTestCase.php (modified) (1 diff)
- trunk/src/test/runIntegration.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/build.xml
r231 r400 29 29 </if> 30 30 </target> 31 32 <target name="test-integration" description="run test suite"> 33 <if> 34 <isset property="package" /> 35 <then> 36 <phing phingfile="${build.base.dir}/${package}/build.xml" target="test-integration" inheritAll="false" /> 37 </then> 38 <else> 39 <phing phingfile="${build.base.dir}/stubbles/build.xml" target="test-integration" inheritAll="false" /> 40 </else> 41 </if> 42 </target> 31 43 </project> trunk/build/stubbles/build.xml
r389 r400 7 7 <taskDef name="mySimpletest" classname="MySimpleTestTask" classpath="${project.basedir}/../../src/test" /> 8 8 9 <target name="main" if="version" depends="test, versioncheck,copy-files,build-archives,tar"/>9 <target name="main" if="version" depends="test,test-integration,versioncheck,copy-files,build-archives,tar"/> 10 10 11 11 <target name="versioncheck" unless="version"> … … 84 84 85 85 <property name="tgzfile" value="${build.base.dir}/${pkg.name}.tgz"/> 86 <delete file="${tgzfile}"/>86 <delete file="${tgzfile}"/> 87 87 <tar compression="gzip" destFile="${tgzfile}" basedir="${build.base.dir}"> 88 88 <fileset dir="${build.base.dir}"> … … 95 95 <mySimpletest testfile=""${project.basedir}/../../src/test/run.php"" exit="true" /> 96 96 </target> 97 98 <target name="test-integration"> 99 <mySimpletest testfile=""${project.basedir}/../../src/test/runIntegration.php"" exit="true" /> 100 </target> 97 101 </project> trunk/config/xml/rdbms.xml
r319 r400 5 5 <pool> 6 6 <connection> 7 <dsn> foo</dsn>8 <userName> bar</userName>9 <password> baz</password>7 <dsn>mysql:host=localhost;dbname=example</dsn> 8 <userName>root</userName> 9 <password>foo</password> 10 10 </connection> 11 11 </pool> trunk/src/main/php/net/stubbles/rdbms/stubDatabaseConnectionData.php
r244 r400 18 18 * id of the default connection 19 19 */ 20 const ID_DEFAULT= '__default';20 const DEFAULT_ID = '__default'; 21 21 /** 22 22 * id to use for the connection … … 24 24 * @var string 25 25 */ 26 protected $id = self:: ID_DEFAULT;26 protected $id = self::DEFAULT_ID; 27 27 /** 28 28 * the full qualified name of the class to use for the connection trunk/src/main/php/net/stubbles/rdbms/stubDatabaseConnectionPool.php
r174 r400 43 43 * @throws stubDatabaseException 44 44 */ 45 public static function getConnection($id = stubDatabaseConnectionData:: ID_DEFAULT)45 public static function getConnection($id = stubDatabaseConnectionData::DEFAULT_ID) 46 46 { 47 47 if (isset(self::$connections[$id]) == false) { … … 82 82 * @return bool 83 83 */ 84 public static function hasConnectionData($id = stubDatabaseConnectionData:: ID_DEFAULT)84 public static function hasConnectionData($id = stubDatabaseConnectionData::DEFAULT_ID) 85 85 { 86 86 return isset(self::$connectionData[$id]); … … 93 93 * @return stubDatabaseConnectionData 94 94 */ 95 public static function getConnectionData($id = stubDatabaseConnectionData:: ID_DEFAULT)95 public static function getConnectionData($id = stubDatabaseConnectionData::DEFAULT_ID) 96 96 { 97 97 if (isset(self::$connectionData[$id]) == true) { … … 107 107 * @param string $id optional id of the connection data to remove 108 108 */ 109 public static function removeConnectionData($id = stubDatabaseConnectionData:: ID_DEFAULT)109 public static function removeConnectionData($id = stubDatabaseConnectionData::DEFAULT_ID) 110 110 { 111 111 if (isset(self::$connectionData[$id]) == true) { … … 121 121 * @param string $id optional id of the connection to close 122 122 */ 123 public static function closeConnection($id = stubDatabaseConnectionData:: ID_DEFAULT)123 public static function closeConnection($id = stubDatabaseConnectionData::DEFAULT_ID) 124 124 { 125 125 if (isset(self::$connections[$id]) == true) { trunk/src/main/php/net/stubbles/util/log/stubFileLogAppender.php
r373 r400 53 53 54 54 /** 55 * returns the logpath 56 * 57 * @return string 58 */ 59 public function getLogDir() 60 { 61 return $this->logDir; 62 } 63 64 /** 55 65 * builds the log directory 56 66 * trunk/src/main/php/net/stubbles/util/log/stubLogger.php
r146 r400 127 127 128 128 /** 129 * returns a list of existing instances 130 * 131 * @return array<string> 132 */ 133 public static function getInstanceList() 134 { 135 return array_keys(self::$instances); 136 } 137 138 /** 129 139 * destroys the logger with the given id 130 140 * … … 191 201 { 192 202 $this->logAppender[] = $logAppender; 203 } 204 205 /** 206 * returns a list of log appenders appended to the logger 207 * 208 * @return array<stubLogAppender> 209 */ 210 public function getLogAppenders() 211 { 212 return $this->logAppender; 193 213 } 194 214 trunk/src/test/php/net/stubbles/rdbms/stubDatabaseConnectionDataTestCase.php
r248 r400 22 22 { 23 23 $connectionData = new stubDatabaseConnectionData(); 24 $this->assertEqual($connectionData->getId(), stubDatabaseConnectionData:: ID_DEFAULT);24 $this->assertEqual($connectionData->getId(), stubDatabaseConnectionData::DEFAULT_ID); 25 25 $this->assertEqual($connectionData->getConnectionClassName(), 'net.stubbles.rdbms.pdo.stubDatabasePDOConnection'); 26 26 $this->assertEqual($connectionData->getDSN(), '');
