Changeset 240
- Timestamp:
- 09/25/07 20:43:37 (1 year ago)
- Files:
-
- branches/2.3/classes/phing/tasks/ext/ZipTask.php (modified) (1 diff)
- branches/2.3/classes/phing/tasks/ext/phpunit/PHPUnitTask.php (modified) (2 diffs)
- branches/2.3/classes/phing/tasks/ext/svn/SvnBaseTask.php (modified) (1 diff)
- branches/2.3/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/2.3/classes/phing/tasks/ext/ZipTask.php
r227 r240 119 119 } 120 120 121 if ( 0 == count($this->fileset))121 if (empty($this->filesets)) 122 122 { 123 123 // add the main fileset to the list of filesets to process. 124 $mainFileSet = new FileSet($this->fileset);124 $mainFileSet = new ZipFileSet($this->fileset); 125 125 $mainFileSet->setDir($this->baseDir); 126 126 $this->filesets[] = $mainFileSet; branches/2.3/classes/phing/tasks/ext/phpunit/PHPUnitTask.php
r219 r240 20 20 */ 21 21 22 require_once 'PEAR/Registry.php';23 22 require_once 'phing/Task.php'; 24 23 require_once 'phing/system/io/PhingFile.php'; … … 59 58 60 59 /** 61 * Ugly hack to get PHPUnit version number from PEAR60 * Determine PHPUnit version number 62 61 */ 63 $config = new PEAR_Config(); 64 $registry = new PEAR_Registry($config->get('php_dir')); 65 $pkg_info = $registry->_packageInfo("PHPUnit", null, "pear.phpunit.de"); 66 67 if ($pkg_info != NULL) 68 { 69 if (version_compare($pkg_info['version']['api'], "3.0.0") >= 0) 70 { 71 PHPUnitUtil::$installedVersion = 3; 72 } 73 else 74 { 75 PHPUnitUtil::$installedVersion = 2; 76 } 62 @include_once 'PHPUnit/Runner/Version.php'; 63 @include_once 'PHPUnit2/Runner/Version.php'; 64 65 if (class_exists('PHPUnit_Runner_Version')) 66 { 67 $version = PHPUnit_Runner_Version::id(); 68 } 69 elseif (class_exists('PHPUnit2_Runner_Version')) 70 { 71 $version = PHPUnit2_Runner_Version::id(); 77 72 } 78 73 else 79 74 { 80 /** 81 * Try to find PHPUnit3 82 */ 83 @include_once 'PHPUnit/Util/Filter.php'; 84 85 if (class_exists('PHPUnit_Util_Filter')) 86 { 87 PHPUnitUtil::$installedVersion = 3; 88 } 89 else 90 { 91 /** 92 * Try to find PHPUnit2 93 */ 94 @include_once 'PHPUnit2/Util/Filter.php'; 95 96 if (!class_exists('PHPUnit2_Util_Filter')) { 97 throw new BuildException("PHPUnit task depends on PEAR PHPUnit 2 or 3 package being installed.", $this->getLocation()); 98 } 99 100 PHPUnitUtil::$installedVersion = 2; 101 } 102 } 103 104 // other dependencies that should only be loaded when class is actually used. 75 throw new BuildException("PHPUnit task depends on PHPUnit 2 or 3 package being installed.", $this->getLocation()); 76 } 77 78 if (version_compare($version, "3.0.0") >= 0) 79 { 80 PHPUnitUtil::$installedVersion = 3; 81 } 82 else 83 { 84 PHPUnitUtil::$installedVersion = 2; 85 } 86 87 /** 88 * Other dependencies that should only be loaded when class is actually used. 89 */ 105 90 require_once 'phing/tasks/ext/phpunit/PHPUnitTestRunner.php'; 106 91 require_once 'phing/tasks/ext/phpunit/BatchTest.php'; 107 92 require_once 'phing/tasks/ext/phpunit/FormatterElement.php'; 108 //require_once 'phing/tasks/ext/phpunit/SummaryPHPUnit2ResultFormatter.php'; 109 110 // add some defaults to the PHPUnit filter 93 94 /** 95 * Add some defaults to the PHPUnit filter 96 */ 111 97 if (PHPUnitUtil::$installedVersion == 3) 112 98 { branches/2.3/classes/phing/tasks/ext/svn/SvnBaseTask.php
r227 r240 198 198 return isset( $this->svnSwitches['no-auth-cache'] ) ? $this->svnSwitches['no-auth-cache'] : ''; 199 199 } 200 200 201 /** 202 * Toggles recursive behavior 203 */ 204 function setRecursive($value) 205 { 206 $this->svnSwitches['non-recursive'] = is_bool($value) ? !$value : TRUE; 207 } 208 209 /** 210 * Returns status of recursive behavior 211 */ 212 function getRecursive() 213 { 214 return isset( $this->svnSwitches['non-recursive'] ) ? $this->svnSwitches['non-recursive'] : ''; 215 } 216 201 217 /** 202 218 * Creates a VersionControl_SVN class based on $mode branches/2.3/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html
r226 r240 23 23 implement the tasks. So if you are searching for the reference to the <code><phplint></code> 24 24 tag, for example, you will want to look at the reference of PhpLintTask. </p> 25 25 26 26 <h2><a name="DbDeployTask"></a>DbDeployTask</h2> 27 27 <p>The <em>DbDeployTask</em> creates .sql files for making revisions to a database, based on dbdeploy conventions centering around a changelog table in the database. See <a href="http://dbdeploy.com/documentation/getting-started/rules-for-using-dbdeploy/">rules for using dbdeploy</a> for more information. You will need a changelog table like so:</p> … … 40 40 <taskdef name="dbdeploy" classname="phing.tasks.ext.dbdeploy.DbDeployTask"/> 41 41 42 <dbdeploy 42 <dbdeploy 43 43 url="sqlite:${project.basedir}/data/db.sqlite"> 44 44 userid="dbdeploy" … … 914 914 <h3>Examples</h3> 915 915 <pre> 916 <phpdoc title=" Phing Documentation" \916 <phpdoc title="API Documentation" 917 917 destdir="apidocs" 918 source path="classes/phing"918 sourcecode="no" 919 919 output="HTML:Smarty:PHP"> 920 <fileset dir="./classes" >921 <include name="**/*.php" >920 <fileset dir="./classes"> 921 <include name="**/*.php" /> 922 922 </fileset> 923 <projdocfileset dir="." >924 <include name="README" >925 <include name="INSTALL" >926 <include name="CHANGELOG" >923 <projdocfileset dir="."> 924 <include name="README" /> 925 <include name="INSTALL" /> 926 <include name="CHANGELOG" /> 927 927 </projdocfileset> 928 928 </phpdoc>
