├── LICENSE ├── README.md ├── docs └── .gitkeep ├── phingistrano ├── build.example.xml ├── build.helpers.example.xml ├── build.xml ├── deploy │ ├── NetScpTask.php │ ├── NetSshTask.php │ └── build.xml ├── docs │ └── build.xml ├── package.xml ├── rollback │ └── build.xml ├── sniff │ └── build.xml ├── symfony2.helpers.xml ├── test │ └── build.xml ├── tunnel │ └── build.xml └── version │ ├── GitDescribeTask.php │ ├── GitDiffTask.php │ ├── GitLogTask.php │ ├── GitRemoteShowTask.php │ ├── GitTagTask.php │ ├── MimeMailTask.php │ ├── build.xml │ └── notify.html └── test ├── BuildFileTest.php └── phingistrano ├── GitTasks ├── .svn │ ├── all-wcprops │ ├── entries │ ├── prop-base │ │ ├── GitBaseTest.php.svn-base │ │ ├── GitBranchTaskTest.php.svn-base │ │ ├── GitCheckoutTaskTest.php.svn-base │ │ ├── GitCloneTaskTest.php.svn-base │ │ ├── GitFetchTaskTest.php.svn-base │ │ ├── GitGcTaskTest.php.svn-base │ │ ├── GitInitTaskTest.php.svn-base │ │ ├── GitLogTaskTest.php.svn-base │ │ ├── GitMergeTaskTest.php.svn-base │ │ ├── GitPullTaskTest.php.svn-base │ │ ├── GitPushTaskTest.php.svn-base │ │ ├── GitTagTaskTest.php.svn-base │ │ └── GitTestsHelper.php.svn-base │ └── text-base │ │ ├── GitBaseTest.php.svn-base │ │ ├── GitBaseTest.xml.svn-base │ │ ├── GitBranchTaskTest.php.svn-base │ │ ├── GitBranchTaskTest.xml.svn-base │ │ ├── GitCheckoutTaskTest.php.svn-base │ │ ├── GitCheckoutTaskTest.xml.svn-base │ │ ├── GitCloneTaskTest.php.svn-base │ │ ├── GitCloneTaskTest.xml.svn-base │ │ ├── GitFetchTaskTest.php.svn-base │ │ ├── GitFetchTaskTest.xml.svn-base │ │ ├── GitGcTaskTest.php.svn-base │ │ ├── GitGcTaskTest.xml.svn-base │ │ ├── GitInitTaskTest.php.svn-base │ │ ├── GitInitTaskTest.xml.svn-base │ │ ├── GitLogTaskTest.php.svn-base │ │ ├── GitLogTaskTest.xml.svn-base │ │ ├── GitMergeTaskTest.php.svn-base │ │ ├── GitMergeTaskTest.xml.svn-base │ │ ├── GitPullTaskTest.php.svn-base │ │ ├── GitPullTaskTest.xml.svn-base │ │ ├── GitPushTaskTest.php.svn-base │ │ ├── GitPushTaskTest.xml.svn-base │ │ ├── GitTagTaskTest.php.svn-base │ │ ├── GitTagTaskTest.xml.svn-base │ │ └── GitTestsHelper.php.svn-base ├── GitBaseTest.php ├── GitBaseTest.xml ├── GitBranchTaskTest.php ├── GitBranchTaskTest.xml ├── GitCheckoutTaskTest.php ├── GitCheckoutTaskTest.xml ├── GitCloneTaskTest.php ├── GitCloneTaskTest.xml ├── GitFetchTaskTest.php ├── GitFetchTaskTest.xml ├── GitGcTaskTest.php ├── GitGcTaskTest.xml ├── GitInitTaskTest.php ├── GitInitTaskTest.xml ├── GitLogTaskTest.php ├── GitLogTaskTest.xml ├── GitMergeTaskTest.php ├── GitMergeTaskTest.xml ├── GitPullTaskTest.php ├── GitPullTaskTest.xml ├── GitPushTaskTest.php ├── GitPushTaskTest.xml ├── GitTagTaskTest.php ├── GitTagTaskTest.xml └── GitTestsHelper.php ├── ScpTask ├── .svn │ └── entries ├── ScpTaskTest.php ├── ScpTaskTest.xml └── ScpTestHelper.php └── SshTask ├── .svn └── entries ├── SshTaskTest.php ├── SshTaskTest.xml └── SshTestHelper.php /docs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CodeMeme/Phingistrano/506d3eb2138195bb840b57eacabc711d62ccd368/docs/.gitkeep -------------------------------------------------------------------------------- /phingistrano/build.example.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 53 | 56 | 57 | 60 | 61 | 64 | 65 | 68 | 69 | 72 | 73 | 76 | 77 | 80 | 81 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /phingistrano/build.helpers.example.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 28 | 29 | 32 | 33 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | nom nom nom... 47 | 48 | 49 | -------------------------------------------------------------------------------- /phingistrano/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /phingistrano/docs/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /phingistrano/sniff/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 18 | 19 | 20 | 22 | 23 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /phingistrano/symfony2.helpers.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 24 | 27 | 28 | 29 | 30 | 35 | 36 | 41 | 42 | 47 | 48 | 49 | 51 | 57 | 60 | 61 | 62 | 63 | 64 | 66 | 73 | 76 | 77 | 78 | 79 | 80 | 81 | 83 | 91 | 94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /phingistrano/test/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 47 | 48 | 51 | 52 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | <?php 74 | putenv('APPLICATION_ENV=${test.env}'); 75 | include('${test.bootstrap}'); 76 | 77 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 90 | 91 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /phingistrano/tunnel/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 20 | 21 | 24 | 25 | 28 | 29 | 32 | 33 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /phingistrano/version/GitDescribeTask.php: -------------------------------------------------------------------------------- 1 | digit object name. See --abbrev of git-describe 33 | * @var integer 34 | */ 35 | private $abbrev; 36 | 37 | /** 38 | * Consider up to most recent tags. See --candidates of git-describe 39 | * @var integer 40 | */ 41 | private $candidates; 42 | 43 | /** 44 | * Always output the long format. See --long of git-describe 45 | * @var boolean 46 | */ 47 | private $long = false; 48 | 49 | /** 50 | * Only consider tags matching the given pattern. See --match of git-describe 51 | * @var string 52 | */ 53 | private $match; 54 | 55 | /** 56 | * Show uniquely abbreviated commit object as fallback. See --always of git-describe 57 | * @var boolean 58 | */ 59 | private $always = false; 60 | 61 | /** 62 | * argument to git-describe 63 | * @var string 64 | */ 65 | private $committish; 66 | 67 | /** 68 | * Property name to set with output value from git-describe 69 | * @var string 70 | */ 71 | private $outputProperty; 72 | 73 | /** 74 | * The main entry point for the task 75 | */ 76 | public function main() 77 | { 78 | if (null === $this->getRepository()) { 79 | throw new BuildException('"repository" is required parameter'); 80 | } 81 | 82 | $client = $this->getGitClient(false, $this->getRepository()); 83 | $command = $client->getCommand('describe'); 84 | $command 85 | ->setOption('all', $this->isAll()) 86 | ->setOption('tags', $this->isTags()) 87 | ->setOption('contains', $this->isContains()) 88 | ->setOption('long', $this->isLong()) 89 | ->setOption('always', $this->isAlways()); 90 | 91 | if (null !== $this->getAbbrev()) { 92 | $command->setOption('abbrev', $this->getAbbrev()); 93 | } 94 | if (null !== $this->getCandidates()) { 95 | $command->setOption('candidates', $this->getCandidates()); 96 | } 97 | if (null !== $this->getMatch()) { 98 | $command->setOption('match', $this->getMatch()); 99 | } 100 | if (null !== $this->getCommittish()) { 101 | $command->addArgument($this->getCommittish()); 102 | } 103 | 104 | try { 105 | $output = $command->execute(); 106 | } catch (Exception $e) { 107 | throw new BuildException('Task execution failed'); 108 | } 109 | 110 | if (null !== $this->outputProperty) { 111 | $this->project->setProperty($this->outputProperty, $output); 112 | } 113 | 114 | $this->log( 115 | sprintf('git-describe: recent tags for "%s" repository', $this->getRepository()), 116 | Project::MSG_INFO); 117 | $this->log('git-describe output: ' . trim($output), Project::MSG_INFO); 118 | } 119 | 120 | public function setAll($flag) 121 | { 122 | $this->all = (bool)$flag; 123 | } 124 | 125 | public function getAll() 126 | { 127 | return $this->all; 128 | } 129 | 130 | public function isAll() 131 | { 132 | return $this->getAll(); 133 | } 134 | 135 | public function setTags($flag) 136 | { 137 | $this->tags = (bool)$flag; 138 | } 139 | 140 | public function getTags() 141 | { 142 | return $this->tags; 143 | } 144 | 145 | public function isTags() 146 | { 147 | return $this->getTags(); 148 | } 149 | 150 | public function setContains($flag) 151 | { 152 | $this->contains = (bool)$flag; 153 | } 154 | 155 | public function getContains() 156 | { 157 | return $this->contains; 158 | } 159 | 160 | public function isContains() 161 | { 162 | return $this->getContains(); 163 | } 164 | 165 | public function setAbbrev($length) 166 | { 167 | $this->abbrev = (int)$length; 168 | } 169 | 170 | public function getAbbrev() 171 | { 172 | return $this->abbrev; 173 | } 174 | 175 | public function setCandidates($count) 176 | { 177 | $this->candidates = (int)$count; 178 | } 179 | 180 | public function getCandidates() 181 | { 182 | return $this->candidates; 183 | } 184 | 185 | public function setLong($flag) 186 | { 187 | $this->long = (bool)$flag; 188 | } 189 | 190 | public function getLong() 191 | { 192 | return $this->long; 193 | } 194 | 195 | public function isLong() 196 | { 197 | return $this->getLong(); 198 | } 199 | 200 | public function setMatch($pattern) 201 | { 202 | $this->match = $pattern; 203 | } 204 | 205 | public function getMatch() 206 | { 207 | return $this->match; 208 | } 209 | 210 | public function setAlways($flag) 211 | { 212 | $this->always = (bool)$flag; 213 | } 214 | 215 | public function getAlways() 216 | { 217 | return $this->always; 218 | } 219 | 220 | public function isAlways() 221 | { 222 | return $this->getAlways(); 223 | } 224 | 225 | public function setCommittish($object) 226 | { 227 | $this->committish = $object; 228 | } 229 | 230 | public function getCommittish() 231 | { 232 | return $this->committish; 233 | } 234 | 235 | public function setOutputProperty($prop) 236 | { 237 | $this->outputProperty = $prop; 238 | } 239 | } 240 | -------------------------------------------------------------------------------- /phingistrano/version/GitDiffTask.php: -------------------------------------------------------------------------------- 1 | argument(s) to git-diff 45 | * @var string 46 | */ 47 | private $commits; 48 | 49 | /** 50 | * arguments to git-diff 51 | * Accepts one or more paths delimited by PATH_SEPARATOR 52 | * @var string 53 | */ 54 | private $paths; 55 | 56 | /** 57 | * Property name to set with output value from git-diff 58 | * @var string 59 | */ 60 | private $outputProperty; 61 | 62 | /** 63 | * The main entry point for the task 64 | */ 65 | public function main() 66 | { 67 | if (null === $this->getRepository()) { 68 | throw new BuildException('"repository" is required parameter'); 69 | } 70 | 71 | $client = $this->getGitClient(false, $this->getRepository()); 72 | $command = $client->getCommand('diff'); 73 | $command 74 | ->setOption('stat', $this->getStat()) 75 | ->setOption('shortstat', $this->isShortstat()) 76 | ->setOption('name-status', $this->isNameStatus()) 77 | ->setOption('ignore-submodules', $this->isIgnoreSubmodules()) 78 | ->setOption('cached', $this->isCached()); 79 | 80 | if (null !== $this->getCommits()) { 81 | $command->addArgument($this->getCommits()); 82 | } 83 | 84 | if (null !== $this->getPaths()) { 85 | $command->addArgument('--'); 86 | $paths = explode(PATH_SEPARATOR, $this->getPaths()); 87 | foreach ($paths as $path) { 88 | $command->addArgument($path); 89 | } 90 | } 91 | 92 | try { 93 | $output = $command->execute(); 94 | } catch (Exception $e) { 95 | throw new BuildException('Task execution failed'); 96 | } 97 | 98 | if (null !== $this->outputProperty) { 99 | $this->project->setProperty($this->outputProperty, $output); 100 | } 101 | 102 | $this->log( 103 | sprintf('git-diff: commit diffs for "%s" repository', $this->getRepository()), 104 | Project::MSG_INFO); 105 | $this->log('git-diff output: ' . trim($output), Project::MSG_INFO); 106 | } 107 | 108 | public function setStat($stat) 109 | { 110 | $this->stat = $stat; 111 | } 112 | 113 | public function getStat() 114 | { 115 | return $this->stat; 116 | } 117 | 118 | public function setShortstat($flag) 119 | { 120 | $this->shortstat = (bool)$flag; 121 | } 122 | 123 | public function getShortstat() 124 | { 125 | return $this->shortstat; 126 | } 127 | 128 | public function isShortstat() 129 | { 130 | return $this->getShortstat(); 131 | } 132 | 133 | public function setNameStatus($flag) 134 | { 135 | $this->nameStatus = (boolean)$flag; 136 | } 137 | 138 | public function getNameStatus() 139 | { 140 | return $this->nameStatus; 141 | } 142 | 143 | public function isNameStatus() 144 | { 145 | return $this->getNameStatus(); 146 | } 147 | 148 | public function setIgnoreSubmodules($flag) 149 | { 150 | $this->ignoreSubmodules = (bool)$flag; 151 | } 152 | 153 | public function getIgnoreSubmodules() 154 | { 155 | return $this->ignoreSubmodules; 156 | } 157 | 158 | public function isIgnoreSubmodules() 159 | { 160 | return $this->getIgnoreSubmodules(); 161 | } 162 | 163 | public function setCached($flag) 164 | { 165 | $this->cached = (bool)$flag; 166 | } 167 | 168 | public function getCached() 169 | { 170 | return $this->cached; 171 | } 172 | 173 | public function isCached() 174 | { 175 | return $this->getCached(); 176 | } 177 | 178 | public function setCommits($commits) 179 | { 180 | $this->commits = $commits; 181 | } 182 | 183 | public function getCommits() 184 | { 185 | return $this->commits; 186 | } 187 | 188 | public function setPaths($paths) 189 | { 190 | $this->paths = $paths; 191 | } 192 | 193 | public function getPaths() 194 | { 195 | return $this->paths; 196 | } 197 | 198 | public function setOutputProperty($prop) 199 | { 200 | $this->outputProperty = $prop; 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /phingistrano/version/GitLogTask.php: -------------------------------------------------------------------------------- 1 | |-n|--max-count of git-log 27 | * @var integer 28 | */ 29 | private $maxCount; 30 | 31 | /** 32 | * Don't show commits with more than one parent. See --no-merges of git-log 33 | * @var boolean 34 | */ 35 | private $noMerges = false; 36 | 37 | /** 38 | * Commit format. See --format of git-log 39 | * @var string 40 | */ 41 | private $format = 'medium'; 42 | 43 | /** 44 | * Date format. See --date of git-log 45 | * @var string 46 | */ 47 | private $date; 48 | 49 | /** 50 | * argument to git-log 51 | * @var string 52 | */ 53 | private $sinceCommit; 54 | 55 | /** 56 | * argument to git-log 57 | * @var string 58 | */ 59 | private $untilCommit; 60 | 61 | /** 62 | * arguments to git-log 63 | * Accepts one or more paths delimited by PATH_SEPARATOR 64 | * @var string 65 | */ 66 | private $paths; 67 | 68 | /** 69 | * Property name to set with output value from git-log 70 | * @var string 71 | */ 72 | private $outputProperty; 73 | 74 | /** 75 | * The main entry point for the task 76 | */ 77 | public function main() 78 | { 79 | if (null === $this->getRepository()) { 80 | throw new BuildException('"repository" is required parameter'); 81 | } 82 | 83 | $client = $this->getGitClient(false, $this->getRepository()); 84 | $command = $client->getCommand('log'); 85 | $command 86 | ->setOption('stat', $this->getStat()) 87 | ->setOption('name-status', $this->isNameStatus()) 88 | ->setOption('no-merges', $this->isNoMerges()) 89 | ->setOption('format', $this->getFormat()); 90 | 91 | if (null !== $this->getMaxCount()) { 92 | $command->setOption('max-count', $this->getMaxCount()); 93 | } 94 | 95 | if (null !== $this->getDate()) { 96 | $command->setOption('date', $this->getDate()); 97 | } 98 | 99 | if (null !== $this->getSince() && null !== $this->getUntil()) { 100 | $command->addArgument($this->getSince() . '..' . $this->getUntil()); 101 | } 102 | 103 | if (null !== $this->getPaths()) { 104 | $command->addArgument('--'); 105 | $paths = explode(PATH_SEPARATOR, $this->getPaths()); 106 | foreach ($paths as $path) { 107 | $command->addArgument($path); 108 | } 109 | } 110 | 111 | try { 112 | $output = $command->execute(); 113 | } catch (Exception $e) { 114 | throw new BuildException('Task execution failed'); 115 | } 116 | 117 | if (null !== $this->outputProperty) { 118 | $this->project->setProperty($this->outputProperty, $output); 119 | } 120 | 121 | $this->log( 122 | sprintf('git-log: commit log for "%s" repository', $this->getRepository()), 123 | Project::MSG_INFO); 124 | $this->log('git-log output: ' . trim($output), Project::MSG_INFO); 125 | } 126 | 127 | public function setStat($stat) 128 | { 129 | $this->stat = $stat; 130 | } 131 | 132 | public function getStat() 133 | { 134 | return $this->stat; 135 | } 136 | 137 | public function setNameStatus($flag) 138 | { 139 | $this->nameStatus = (boolean)$flag; 140 | } 141 | 142 | public function getNameStatus() 143 | { 144 | return $this->nameStatus; 145 | } 146 | 147 | public function isNameStatus() 148 | { 149 | return $this->getNameStatus(); 150 | } 151 | 152 | public function setMaxCount($count) 153 | { 154 | $this->maxCount = (int)$count; 155 | } 156 | 157 | public function getMaxCount() 158 | { 159 | return $this->maxCount; 160 | } 161 | 162 | public function setNoMerges($flag) 163 | { 164 | $this->noMerges = (bool)$flag; 165 | } 166 | 167 | public function getNoMerges() 168 | { 169 | return $this->noMerges; 170 | } 171 | 172 | public function isNoMerges() 173 | { 174 | return $this->getNoMerges(); 175 | } 176 | 177 | public function setFormat($format) 178 | { 179 | $this->format = $format; 180 | } 181 | 182 | public function getFormat() 183 | { 184 | return $this->format; 185 | } 186 | 187 | public function setDate($date) 188 | { 189 | $this->date = $date; 190 | } 191 | 192 | public function getDate() 193 | { 194 | return $this->date; 195 | } 196 | 197 | public function setSince($since) 198 | { 199 | $this->sinceCommit = $since; 200 | } 201 | 202 | public function getSince() 203 | { 204 | return $this->sinceCommit; 205 | } 206 | 207 | public function setUntil($until) 208 | { 209 | $this->untilCommit = $until; 210 | } 211 | 212 | public function getUntil() 213 | { 214 | return $this->untilCommit; 215 | } 216 | 217 | public function setPaths($paths) 218 | { 219 | $this->paths = $paths; 220 | } 221 | 222 | public function getPaths() 223 | { 224 | return $this->paths; 225 | } 226 | 227 | public function setOutputProperty($prop) 228 | { 229 | $this->outputProperty = $prop; 230 | } 231 | } 232 | -------------------------------------------------------------------------------- /phingistrano/version/GitRemoteShowTask.php: -------------------------------------------------------------------------------- 1 | . See -n of git-remote-show 15 | * @var boolean 16 | */ 17 | private $noQuery = false; 18 | 19 | /** 20 | * argument to git-remote-show 21 | * @var string 22 | */ 23 | private $name; 24 | 25 | /** 26 | * Property name to set with output value from git-remote-show 27 | * @var string 28 | */ 29 | private $outputProperty; 30 | 31 | /** 32 | * The main entry point for the task 33 | */ 34 | public function main() 35 | { 36 | if (null === $this->getRepository()) { 37 | throw new BuildException('"repository" is required parameter'); 38 | } 39 | 40 | if (null === $this->getName()) { 41 | throw new BuildException('"name" is required parameter'); 42 | } 43 | 44 | $client = $this->getGitClient(false, $this->getRepository()); 45 | $command = $client->getCommand('remote show'); 46 | $command->setOption('n', $this->isNoQuery()); 47 | $command->addArgument($this->getName()); 48 | 49 | try { 50 | $output = $command->execute(); 51 | } catch (Exception $e) { 52 | throw new BuildException('Task execution failed'); 53 | } 54 | 55 | if (null !== $this->outputProperty) { 56 | $this->project->setProperty($this->outputProperty, $output); 57 | } 58 | 59 | $this->log( 60 | sprintf('git-remote-show: remotes for "%s" repository', $this->getRepository()), 61 | Project::MSG_INFO); 62 | $this->log('git-remote-show output: ' . trim($output), Project::MSG_INFO); 63 | } 64 | 65 | public function setNoQuery($flag) 66 | { 67 | $this->noQuery = (bool)$flag; 68 | } 69 | 70 | public function getNoQuery() 71 | { 72 | return $this->noQuery; 73 | } 74 | 75 | public function isNoQuery() 76 | { 77 | return $this->getNoQuery(); 78 | } 79 | 80 | public function setName($remote) 81 | { 82 | $this->name = $remote; 83 | } 84 | 85 | public function getName() 86 | { 87 | return $this->name; 88 | } 89 | 90 | public function setOutputProperty($prop) 91 | { 92 | $this->outputProperty = $prop; 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /phingistrano/version/notify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

** Release Notice **

6 | 7 |

8 | The application ${phing.project.name} has a new release as of ${timeStamp}. 9 |

10 | 11 |

12 | Changes from past release ${beginTag} to this release ${endTag}... 13 |

${changeLog}
14 |

15 | 16 |

17 | Files affected: 18 |

${fullDiffStat}
19 |

20 | 21 |

22 | Review these changes on Github 23 |

24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 65 4 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks 5 | END 6 | GitGcTaskTest.xml 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 83 10 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.xml 11 | END 12 | GitFetchTaskTest.xml 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 86 16 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.xml 17 | END 18 | GitInitTaskTest.php 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 85 22 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.php 23 | END 24 | GitCheckoutTaskTest.php 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 89 28 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.php 29 | END 30 | GitBranchTaskTest.xml 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 87 34 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.xml 35 | END 36 | GitMergeTaskTest.xml 37 | K 25 38 | svn:wc:ra_dav:version-url 39 | V 86 40 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.xml 41 | END 42 | GitCloneTaskTest.xml 43 | K 25 44 | svn:wc:ra_dav:version-url 45 | V 86 46 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.xml 47 | END 48 | GitTagTaskTest.php 49 | K 25 50 | svn:wc:ra_dav:version-url 51 | V 84 52 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitTagTaskTest.php 53 | END 54 | GitInitTaskTest.xml 55 | K 25 56 | svn:wc:ra_dav:version-url 57 | V 85 58 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitInitTaskTest.xml 59 | END 60 | GitPullTaskTest.php 61 | K 25 62 | svn:wc:ra_dav:version-url 63 | V 85 64 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.php 65 | END 66 | GitCheckoutTaskTest.xml 67 | K 25 68 | svn:wc:ra_dav:version-url 69 | V 89 70 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitCheckoutTaskTest.xml 71 | END 72 | GitPushTaskTest.php 73 | K 25 74 | svn:wc:ra_dav:version-url 75 | V 85 76 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.php 77 | END 78 | GitTestsHelper.php 79 | K 25 80 | svn:wc:ra_dav:version-url 81 | V 84 82 | /!svn/ver/1125/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitTestsHelper.php 83 | END 84 | GitLogTaskTest.php 85 | K 25 86 | svn:wc:ra_dav:version-url 87 | V 84 88 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitLogTaskTest.php 89 | END 90 | GitTagTaskTest.xml 91 | K 25 92 | svn:wc:ra_dav:version-url 93 | V 84 94 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitTagTaskTest.xml 95 | END 96 | GitPullTaskTest.xml 97 | K 25 98 | svn:wc:ra_dav:version-url 99 | V 85 100 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitPullTaskTest.xml 101 | END 102 | GitBaseTest.php 103 | K 25 104 | svn:wc:ra_dav:version-url 105 | V 81 106 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.php 107 | END 108 | GitPushTaskTest.xml 109 | K 25 110 | svn:wc:ra_dav:version-url 111 | V 85 112 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitPushTaskTest.xml 113 | END 114 | GitGcTaskTest.php 115 | K 25 116 | svn:wc:ra_dav:version-url 117 | V 83 118 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitGcTaskTest.php 119 | END 120 | GitFetchTaskTest.php 121 | K 25 122 | svn:wc:ra_dav:version-url 123 | V 86 124 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitFetchTaskTest.php 125 | END 126 | GitLogTaskTest.xml 127 | K 25 128 | svn:wc:ra_dav:version-url 129 | V 84 130 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitLogTaskTest.xml 131 | END 132 | GitBranchTaskTest.php 133 | K 25 134 | svn:wc:ra_dav:version-url 135 | V 87 136 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitBranchTaskTest.php 137 | END 138 | GitMergeTaskTest.php 139 | K 25 140 | svn:wc:ra_dav:version-url 141 | V 86 142 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitMergeTaskTest.php 143 | END 144 | GitCloneTaskTest.php 145 | K 25 146 | svn:wc:ra_dav:version-url 147 | V 86 148 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitCloneTaskTest.php 149 | END 150 | GitBaseTest.xml 151 | K 25 152 | svn:wc:ra_dav:version-url 153 | V 81 154 | /!svn/ver/1179/branches/2.5/test/classes/phing/tasks/ext/GitTasks/GitBaseTest.xml 155 | END 156 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitBaseTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitBranchTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitCheckoutTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitCloneTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitFetchTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitGcTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitInitTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitLogTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitMergeTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitPullTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitPushTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitTagTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/prop-base/GitTestsHelper.php.svn-base: -------------------------------------------------------------------------------- 1 | K 12 2 | svn:keywords 3 | V 2 4 | Id 5 | END 6 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitBaseTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitBaseTask.php'; 24 | 25 | /** 26 | * @author Victor Farazdagi 27 | * @version $Id$ 28 | * @package phing.tasks.ext 29 | */ 30 | class GitBaseTest extends BuildFileTest { 31 | 32 | protected $mock; 33 | 34 | public function setUp() { 35 | $this->configureProject(__DIR__ . "/GitBaseTest.xml"); 36 | $this->mock = $this->getMockForAbstractClass('GitBaseTask'); 37 | } 38 | 39 | public function testInitialization() 40 | { 41 | $this->assertInstanceOf('GitBaseTask', $this->mock); 42 | } 43 | 44 | /** 45 | * @todo - make sure that required arguments are checked 46 | */ 47 | public function testArguments() 48 | {} 49 | 50 | public function testMutators() 51 | { 52 | // gitPath 53 | $gitPath = $this->mock->getGitPath(); 54 | $this->mock->setGitPath('my-new-path'); 55 | $this->assertEquals('my-new-path', $this->mock->getGitPath()); 56 | $this->mock->setGitPath($gitPath); 57 | 58 | // repository 59 | $repository = $this->mock->getRepository(); 60 | $this->mock->setRepository('/tmp'); 61 | $this->assertEquals('/tmp', $this->mock->getRepository()); 62 | $this->mock->setRepository($repository); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitBaseTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitBranchTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitBranchTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitBranchTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitBranchTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-branch output: Branch all-params-set set up to track remote branch master from origin.'); 55 | } 56 | 57 | public function testNoRepositorySpecified() 58 | { 59 | $this->expectBuildExceptionContaining('noRepository', 60 | 'Repo dir is required', 61 | '"repository" is required parameter'); 62 | } 63 | 64 | public function testNoBranchnameSpecified() 65 | { 66 | $this->expectBuildExceptionContaining('noBranchname', 67 | 'Branchname dir is required', 68 | '"branchname" is required parameter'); 69 | } 70 | 71 | public function testTrackParameter() 72 | { 73 | $repository = PHING_TEST_TMP . '/git'; 74 | 75 | $this->executeTarget('trackParamSet'); 76 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 77 | $this->assertInLogs( 'git-branch output: Branch track-param-set set up to track local branch master.'); 78 | } 79 | 80 | public function testNoTrackParameter() 81 | { 82 | $repository = PHING_TEST_TMP . '/git'; 83 | 84 | $this->executeTarget('noTrackParamSet'); 85 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 86 | $this->assertInLogs('git-branch output: '); // no output actually 87 | } 88 | 89 | public function testSetUpstreamParameter() 90 | { 91 | $repository = PHING_TEST_TMP . '/git'; 92 | 93 | $this->executeTarget('setUpstreamParamSet'); 94 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 95 | $this->assertInLogs('Branch set-upstream-param-set set up to track local branch master.'); // no output actually 96 | } 97 | 98 | public function testForceParameter() 99 | { 100 | $repository = PHING_TEST_TMP . '/git'; 101 | 102 | $this->executeTarget('forceParamSet'); 103 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 104 | $this->assertInLogs('git-branch output: '); // no output actually 105 | } 106 | 107 | public function testDeleteBranch() 108 | { 109 | $repository = PHING_TEST_TMP . '/git'; 110 | 111 | $this->executeTarget('deleteBranch'); 112 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 113 | $this->assertInLogs('Branch delete-branch-1 set up to track local branch master.'); 114 | $this->assertInLogs('Branch delete-branch-2 set up to track local branch master.'); 115 | $this->assertInLogs('Deleted branch delete-branch-1'); 116 | $this->assertInLogs('Deleted branch delete-branch-2'); 117 | } 118 | 119 | public function testMoveBranch() 120 | { 121 | $repository = PHING_TEST_TMP . '/git'; 122 | 123 | $this->executeTarget('moveBranch'); 124 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 125 | // try to delete new branch (thus understanding that rename worked) 126 | $this->assertInLogs('Deleted branch move-branch-2'); 127 | } 128 | 129 | public function testForceMoveBranch() 130 | { 131 | $repository = PHING_TEST_TMP . '/git'; 132 | 133 | $this->executeTarget('forceMoveBranch'); 134 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 135 | // try to delete new branch (thus understanding that rename worked) 136 | $this->assertInLogs('Deleted branch move-branch-2'); 137 | } 138 | 139 | public function testForceMoveBranchNoNewbranch() 140 | { 141 | $repository = PHING_TEST_TMP . '/git'; 142 | 143 | $this->expectBuildExceptionContaining('forceMoveBranchNoNewbranch', 144 | 'New branch name is required in branch move', 145 | '"newbranch" is required parameter'); 146 | } 147 | 148 | public function testMoveBranchNoNewbranch() 149 | { 150 | $repository = PHING_TEST_TMP . '/git'; 151 | 152 | $this->expectBuildExceptionContaining('moveBranchNoNewbranch', 153 | 'New branch name is required in branch move', 154 | '"newbranch" is required parameter'); 155 | } 156 | 157 | 158 | } 159 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitBranchTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 39 | 40 | 41 | 42 | 45 | 49 | 50 | 51 | 52 | 55 | 59 | 60 | 61 | 62 | 65 | 68 | 69 | 74 | 75 | 76 | 77 | 80 | 83 | 86 | 90 | 94 | 95 | 96 | 97 | 100 | 103 | 108 | 112 | 113 | 114 | 115 | 118 | 121 | 126 | 130 | 131 | 132 | 133 | 136 | 139 | 143 | 144 | 145 | 146 | 149 | 152 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitCheckoutTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitCheckoutTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitCheckoutTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitCheckoutTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testCheckoutExistingBranch() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('checkoutExistingBranch'); 54 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 55 | $this->assertInLogs('git-branch output: Branch co-branch set up to track remote branch master from origin.'); 56 | // @todo - actually make sure that Ebihara updates code to return (not 57 | // echo output from $command->execute() 58 | //$this->assertInLogs("Switched to branch 'test'"); 59 | $this->assertInLogs('git-checkout output: '); // no output actually 60 | } 61 | 62 | public function testCheckoutNonExistingBranch() 63 | { 64 | $this->expectBuildExceptionContaining('checkoutNonExistingBranch', 65 | 'Checkout of non-existent repo is impossible', 66 | 'Task execution failed'); 67 | } 68 | 69 | public function testNoRepositorySpecified() 70 | { 71 | $this->expectBuildExceptionContaining('noRepository', 72 | 'Repo dir is required', 73 | '"repository" is required parameter'); 74 | } 75 | 76 | public function testNoBranchnameSpecified() 77 | { 78 | $this->expectBuildExceptionContaining('noBranchname', 79 | 'Branchname is required', 80 | '"branchname" is required parameter'); 81 | } 82 | 83 | public function testCheckoutMerge() 84 | { 85 | $repository = PHING_TEST_TMP . '/git'; 86 | $this->executeTarget('checkoutMerge'); 87 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 88 | $this->assertInLogs('git-branch output: Branch co-branch set up to track remote branch master from origin.'); 89 | $this->assertInLogs('git-branch output: Deleted branch master'); 90 | } 91 | 92 | public function testCheckoutCreateBranch() 93 | { 94 | $repository = PHING_TEST_TMP . '/git'; 95 | $this->executeTarget('checkoutCreateBranch'); 96 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 97 | $this->assertInLogs('git-checkout output: Branch co-create-branch set up to track remote branch master from origin.'); 98 | $this->assertInLogs('git-branch output: Deleted branch co-create-branch'); 99 | } 100 | 101 | public function testForceCheckoutCreateBranch() 102 | { 103 | $repository = PHING_TEST_TMP . '/git'; 104 | $this->executeTarget('checkoutForceCreateBranch'); 105 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 106 | $this->assertInLogs('git-branch output: Deleted branch co-create-branch'); 107 | } 108 | 109 | public function testForceCheckoutCreateBranchFailed() 110 | { 111 | $this->expectBuildExceptionContaining('checkoutForceCreateBranchFailed', 112 | 'Branch already exists', 113 | 'Task execution failed.'); 114 | } 115 | 116 | 117 | } 118 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitCheckoutTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 19 | 22 | 23 | 24 | 25 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 49 | 53 | 56 | 57 | 58 | 59 | 62 | 67 | 68 | 71 | 74 | 75 | 76 | 77 | 80 | 84 | 85 | 88 | 89 | 93 | 94 | 97 | 100 | 101 | 102 | 103 | 106 | 110 | 111 | 114 | 115 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitCloneTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitCloneTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitCloneTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | // set temp directory used by test cases 35 | mkdir(PHING_TEST_TMP . '/git'); 36 | 37 | $this->configureProject(__DIR__ . '/GitCloneTaskTest.xml'); 38 | } 39 | 40 | public function tearDown() 41 | { 42 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 43 | } 44 | 45 | public function testWrongRepository() 46 | { 47 | $this->expectBuildExceptionContaining('wrongRepository', 48 | 'Repository not readable', 49 | 'The remote end hung up unexpectedly'); 50 | } 51 | 52 | public function testWrongTargetPath() 53 | { 54 | $this->expectBuildExceptionContaining('wrongTargetPath', 55 | 'Repository not readable', 56 | 'You must specify readable directory as repository'); 57 | } 58 | 59 | public function testGitClone() 60 | { 61 | $repository = PHING_TEST_TMP . '/git'; 62 | $gitFilesDir = $repository . '/.git'; 63 | $this->executeTarget('gitClone'); 64 | 65 | $this->assertInLogs('git-clone: cloning "git://github.com/farazdagi/phing-tests.git" repository to "' . $repository . '" directory'); 66 | $this->assertTrue(is_dir($repository)); 67 | $this->assertTrue(is_dir($gitFilesDir)); 68 | // test that file is actully cloned 69 | $this->assertTrue(is_readable($repository . '/README')); 70 | } 71 | 72 | public function testGitCloneBare() 73 | { 74 | $repository = PHING_TEST_TMP . '/git'; 75 | $gitFilesDir = $repository . '/.git'; 76 | $this->executeTarget('gitCloneBare'); 77 | $this->assertInLogs('git-clone: cloning (bare) "git://github.com/farazdagi/phing-tests.git" repository to "' . $repository . '" directory'); 78 | $this->assertTrue(is_dir($repository)); 79 | $this->assertTrue(is_dir($repository . '/branches')); 80 | $this->assertTrue(is_dir($repository . '/info')); 81 | $this->assertTrue(is_dir($repository . '/hooks')); 82 | $this->assertTrue(is_dir($repository . '/refs')); 83 | } 84 | 85 | public function testNoRepositorySpecified() 86 | { 87 | $this->expectBuildExceptionContaining('noRepository', 88 | 'Repo dir is required', 89 | '"repository" is required parameter'); 90 | } 91 | 92 | public function testNoTargetPathSpecified() 93 | { 94 | $this->expectBuildExceptionContaining('noTargetPath', 95 | 'Target path is required', 96 | '"targetPath" is required parameter'); 97 | } 98 | 99 | 100 | } 101 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitCloneTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitFetchTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitFetchTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitFetchTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitFetchTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-fetch: branch "' . $repository . '" repository'); 55 | $this->assertInLogs('git-fetch output: '); // no output actually 56 | } 57 | 58 | public function testFetchAllRemotes() 59 | { 60 | $repository = PHING_TEST_TMP . '/git'; 61 | $this->executeTarget('fetchAllRemotes'); 62 | $this->assertInLogs('git-fetch: branch "' . $repository . '" repository'); 63 | $this->assertInLogs('git-fetch output: Fetching origin'); 64 | } 65 | 66 | public function testNoRepositorySpecified() 67 | { 68 | $this->expectBuildExceptionContaining('noRepository', 69 | 'Repo dir is required', 70 | '"repository" is required parameter'); 71 | } 72 | 73 | public function testNoTargetSpecified() 74 | { 75 | $this->expectBuildExceptionContaining('noTarget', 76 | 'Target is required', 77 | 'No remote repository specified'); 78 | } 79 | 80 | public function testRefspecSet() 81 | { 82 | $repository = PHING_TEST_TMP . '/git'; 83 | $this->executeTarget('refspecSet'); 84 | $this->assertInLogs('git-fetch: branch "' . $repository . '" repository'); 85 | $this->assertInLogs('git-fetch output: '); 86 | $this->assertInLogs('Deleted branch refspec-branch'); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitFetchTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 17 | 18 | 19 | 20 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 40 | 45 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitGcTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitGcTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitGcTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitGcTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-gc: cleaning up "' . $repository . '" repository'); 55 | } 56 | 57 | public function testNoRepositorySpecified() 58 | { 59 | $this->expectBuildExceptionContaining('noRepository', 60 | 'Repo dir is required', 61 | '"repository" is required parameter'); 62 | } 63 | 64 | public function testAutoParameter() 65 | { 66 | $repository = PHING_TEST_TMP . '/git'; 67 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 68 | 69 | $this->executeTarget('autoParamSet'); 70 | $this->assertInLogs($msg); 71 | } 72 | 73 | public function testNoPruneParameter() 74 | { 75 | $repository = PHING_TEST_TMP . '/git'; 76 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 77 | 78 | $this->executeTarget('nopruneParamSet'); 79 | $this->assertInLogs($msg); 80 | } 81 | 82 | public function testAggressiveParameter() 83 | { 84 | $repository = PHING_TEST_TMP . '/git'; 85 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 86 | 87 | $this->executeTarget('aggressiveParamSet'); 88 | $this->assertInLogs($msg); 89 | } 90 | 91 | public function testPruneParameter() 92 | { 93 | $repository = PHING_TEST_TMP . '/git'; 94 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 95 | 96 | $this->executeTarget('pruneParamSet'); 97 | $this->assertInLogs($msg); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitGcTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 32 | 33 | 34 | 35 | 38 | 40 | 41 | 42 | 43 | 46 | 48 | 49 | 50 | 51 | 54 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitInitTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitInitTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitInitTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | // set temp directory used by test cases 35 | mkdir(PHING_TEST_TMP . '/git'); 36 | 37 | $this->configureProject(__DIR__ . '/GitInitTaskTest.xml'); 38 | } 39 | 40 | public function tearDown() 41 | { 42 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 43 | } 44 | 45 | public function testWrongRepository() 46 | { 47 | $this->expectBuildExceptionContaining('wrongRepository', 48 | 'Repository directory not readable', 49 | 'You must specify readable directory as repository.'); 50 | } 51 | 52 | public function testGitInit() 53 | { 54 | $repository = PHING_TEST_TMP . '/git'; 55 | $gitFilesDir = $repository . '/.git'; 56 | $this->executeTarget('gitInit'); 57 | 58 | $this->assertInLogs('git-init: initializing "' . $repository . '" repository'); 59 | $this->assertTrue(is_dir($repository)); 60 | $this->assertTrue(is_dir($gitFilesDir)); 61 | } 62 | 63 | public function testGitInitBare() 64 | { 65 | $repository = PHING_TEST_TMP . '/git'; 66 | $gitFilesDir = $repository . '/.git'; 67 | $this->executeTarget('gitInitBare'); 68 | $this->assertInLogs('git-init: initializing (bare) "' . $repository . '" repository'); 69 | $this->assertTrue(is_dir($repository)); 70 | $this->assertTrue(is_dir($repository . '/branches')); 71 | $this->assertTrue(is_dir($repository . '/info')); 72 | $this->assertTrue(is_dir($repository . '/hooks')); 73 | $this->assertTrue(is_dir($repository . '/refs')); 74 | } 75 | 76 | public function testNoRepositorySpecified() 77 | { 78 | $this->expectBuildExceptionContaining('noRepository', 79 | 'Repo dir is required', 80 | '"repository" is required parameter'); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitInitTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitLogTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 | 31 | 32 | 33 | 34 | 35 | 38 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 56 | 57 | 58 | 59 | 60 | 63 | 67 | 68 | 69 | 70 | 71 | 74 | 79 | 80 | 81 | 82 | 83 | 86 | 91 | 92 | 93 | 94 | 95 | 98 | 101 | 102 | 103 | 104 | 105 | 108 | 111 | 112 | 113 | 114 | 115 | 118 | 121 | 122 | 123 | 124 | 125 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 141 | 142 | 143 | 144 | 145 | 148 | 151 | 152 | 153 | 154 | 155 | 158 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitMergeTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitMergeTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitMergeTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitMergeTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-merge: replaying "merge-test-1 merge-test-2" commits'); 55 | $this->assertInLogs('git-merge output: Already up-to-date.'); 56 | } 57 | 58 | public function testNoCommitSet() 59 | { 60 | $repository = PHING_TEST_TMP . '/git'; 61 | $this->executeTarget('noCommitSet'); 62 | $this->assertInLogs('git-merge: replaying "6dbaf4508e75dcd426b5b974a67c462c70d46e1f" commits'); 63 | $this->assertInLogs('git-merge output: Already up-to-date.'); 64 | } 65 | 66 | public function testRemoteSet() 67 | { 68 | $repository = PHING_TEST_TMP . '/git'; 69 | $this->executeTarget('remoteSet'); 70 | $this->assertInLogs('git-merge: replaying "6dbaf4508e75dcd426b5b974a67c462c70d46e1f" commits'); 71 | $this->assertInLogs('git-merge output: Already up-to-date.'); 72 | } 73 | 74 | public function testFastForwardCommitSet() 75 | { 76 | $repository = PHING_TEST_TMP . '/git'; 77 | $this->executeTarget('fastForwardCommitSet'); 78 | $this->assertInLogs('git-merge command: /usr/bin/git merge --no-ff \'origin/master\''); 79 | $this->assertInLogs('git-merge: replaying "origin/master" commits'); 80 | $this->assertInLogs('Merge remote-tracking branch \'origin/master\' into merge-test-1'); 81 | } 82 | 83 | public function testNoRepositorySpecified() 84 | { 85 | $this->expectBuildExceptionContaining('noRepository', 86 | 'Repo dir is required', 87 | '"repository" is required parameter'); 88 | } 89 | 90 | public function testNoRemotesSpecified() 91 | { 92 | $this->expectBuildExceptionContaining('noRemotes', 93 | 'At least one commit is required', 94 | '"remote" is required parameter'); 95 | } 96 | 97 | public function testWrongStrategySet() 98 | { 99 | $this->expectBuildExceptionContaining('wrongStrategySet', 100 | 'Wrong strategy passed', 'Could not find merge strategy \'plain-wrong\''); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitMergeTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 16 | 19 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 40 | 41 | 44 | 48 | 49 | 50 | 51 | 54 | 55 | 58 | 62 | 63 | 64 | 65 | 68 | 69 | 72 | 75 | 76 | 77 | 78 | 81 | 84 | 87 | 91 | 96 | 97 | 98 | 99 | 102 | 103 | 106 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitPullTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitPullTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitPullTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitPullTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | /*$repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 55 | $this->assertInLogs('git-pull: complete'); 56 | $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3'); 57 | // make sure that foofile from foobranch made it to master 58 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 59 | } 60 | 61 | public function testAllParamsSetRebase() 62 | { 63 | /*$repository = PHING_TEST_TMP . '/git'; 64 | $this->executeTarget('allParamsSetRebase'); 65 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 66 | $this->assertInLogs('git-pull: complete'); 67 | $this->assertInLogs('git-pull output: First, rewinding head to replay your work on top of it...'); 68 | $this->assertInLogs('Fast-forwarded master to 6ad2ea37a26ce3534073e89043f890c054fddb20.'); 69 | // make sure that foofile from foobranch made it to master 70 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 71 | } 72 | 73 | public function testAllReposSet() 74 | { 75 | $repository = PHING_TEST_TMP . '/git'; 76 | $this->executeTarget('allReposSet'); 77 | $this->assertInLogs('git-pull: fetching from all remotes'); 78 | $this->assertInLogs('git-pull: complete'); 79 | } 80 | 81 | public function testTagsSet() 82 | { 83 | /*$repository = PHING_TEST_TMP . '/git'; 84 | $this->executeTarget('tagsSet'); 85 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 86 | $this->assertInLogs('git-pull: complete'); 87 | $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3'); 88 | // make sure that foofile from foobranch made it to master 89 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 90 | } 91 | 92 | public function testAppendSet() 93 | { 94 | $repository = PHING_TEST_TMP . '/git'; 95 | $this->executeTarget('appendSet'); 96 | $this->assertInLogs('git-pull: fetching from all remotes'); 97 | $this->assertInLogs('git-pull: complete'); 98 | $this->assertInLogs('git-pull output: Already up-to-date.'); 99 | } 100 | 101 | public function testNoTagsSet() 102 | { 103 | /*$repository = PHING_TEST_TMP . '/git'; 104 | $this->executeTarget('noTagsSet'); 105 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 106 | $this->assertInLogs('git-pull: complete'); 107 | $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3'); 108 | // make sure that foofile from foobranch made it to master 109 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 110 | } 111 | 112 | public function testNoRepositorySpecified() 113 | { 114 | $this->expectBuildExceptionContaining('noRepository', 115 | 'Repo dir is required', 116 | '"repository" is required parameter'); 117 | } 118 | 119 | public function testNoSourceSpecified() 120 | { 121 | $this->expectBuildExceptionContaining('noSource', 122 | 'At least one source must be provided', 123 | 'No source repository specified'); 124 | } 125 | 126 | public function testWrongStrategySet() 127 | { 128 | $this->expectBuildExceptionContaining('wrongStrategySet', 129 | 'Wrong strategy passed', 'Could not find merge strategy \'plain-wrong\''); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitPullTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 43 | 44 | 45 | 46 | 49 | 54 | 55 | 56 | 57 | 60 | 62 | 63 | 64 | 65 | 68 | 70 | 71 | 72 | 73 | 76 | 80 | 81 | 82 | 83 | 86 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitPushTaskTest.php.svn-base: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitPushTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id$ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitPushTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitPushTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-push: pushing to origin master:foobranch'); 55 | $this->assertInLogs('git-push: complete'); 56 | } 57 | 58 | public function testAllReposSet() 59 | { 60 | $repository = PHING_TEST_TMP . '/git'; 61 | $this->executeTarget('allReposSet'); 62 | $this->assertInLogs('git-push: push to all refs'); 63 | $this->assertInLogs('git-push: complete'); 64 | } 65 | 66 | public function testTagsSet() 67 | { 68 | $repository = PHING_TEST_TMP . '/git'; 69 | $this->executeTarget('tagsSet'); 70 | $this->assertInLogs('git-push: pushing to origin master:foobranch'); 71 | $this->assertInLogs('git-push: complete'); 72 | } 73 | 74 | public function testDeleteSet() 75 | { 76 | $repository = PHING_TEST_TMP . '/git'; 77 | $this->executeTarget('deleteSet'); 78 | $this->assertInLogs('git-push: pushing to origin master:newbranch'); 79 | $this->assertInLogs('git-push: branch delete requested'); 80 | $this->assertInLogs('git-push: complete'); 81 | } 82 | 83 | public function testMirrorSet() 84 | { 85 | $repository = PHING_TEST_TMP . '/git'; 86 | $this->executeTarget('mirrorSet'); 87 | $this->assertInLogs('git-push: mirror all refs'); 88 | $this->assertInLogs('git-push: complete'); 89 | } 90 | 91 | public function testNoRepositorySpecified() 92 | { 93 | $this->expectBuildExceptionContaining('noRepository', 94 | 'Repo dir is required', 95 | '"repository" is required parameter'); 96 | } 97 | 98 | public function testWrongRepo() 99 | { 100 | $this->expectBuildExceptionContaining('wrongRepo', 101 | 'Repo dir is wrong', 102 | 'You must specify readable directory as repository.'); 103 | } 104 | 105 | public function testNoDestinationSpecified() 106 | { 107 | $this->expectBuildExceptionContaining('noDestination', 108 | 'No source set', 109 | 'At least one destination must be provided'); 110 | } 111 | 112 | } 113 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitPushTaskTest.xml.svn-base: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 19 | 20 | 21 | 22 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 41 | 42 | 43 | 44 | 47 | 49 | 50 | 51 | 52 | 55 | 58 | 59 | 60 | 61 | 64 | 67 | 68 | 69 | 72 | 75 | 79 | 80 | 81 | 82 | 85 | 88 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/.svn/text-base/GitTestsHelper.php.svn-base: -------------------------------------------------------------------------------- 1 | 5259486) { 48 | $returndate = round($timediff / 2629744) . " months ago"; 49 | } else { 50 | $returndate = round($timediff / 604900) . " weeks ago"; 51 | } 52 | 53 | return $returndate; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitBaseTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitBaseTask.php'; 24 | 25 | /** 26 | * @author Victor Farazdagi 27 | * @version $Id: GitBaseTest.php 1179 2011-06-22 11:31:08Z mp $ 28 | * @package phing.tasks.ext 29 | */ 30 | class GitBaseTest extends BuildFileTest { 31 | 32 | protected $mock; 33 | 34 | public function setUp() { 35 | $this->configureProject(__DIR__ . "/GitBaseTest.xml"); 36 | $this->mock = $this->getMockForAbstractClass('GitBaseTask'); 37 | } 38 | 39 | public function testInitialization() 40 | { 41 | $this->assertInstanceOf('GitBaseTask', $this->mock); 42 | } 43 | 44 | /** 45 | * @todo - make sure that required arguments are checked 46 | */ 47 | public function testArguments() 48 | {} 49 | 50 | public function testMutators() 51 | { 52 | // gitPath 53 | $gitPath = $this->mock->getGitPath(); 54 | $this->mock->setGitPath('my-new-path'); 55 | $this->assertEquals('my-new-path', $this->mock->getGitPath()); 56 | $this->mock->setGitPath($gitPath); 57 | 58 | // repository 59 | $repository = $this->mock->getRepository(); 60 | $this->mock->setRepository('/tmp'); 61 | $this->assertEquals('/tmp', $this->mock->getRepository()); 62 | $this->mock->setRepository($repository); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitBaseTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitBranchTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitBranchTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitBranchTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitBranchTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitBranchTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-branch output: Branch all-params-set set up to track remote branch master from origin.'); 55 | } 56 | 57 | public function testNoRepositorySpecified() 58 | { 59 | $this->expectBuildExceptionContaining('noRepository', 60 | 'Repo dir is required', 61 | '"repository" is required parameter'); 62 | } 63 | 64 | public function testNoBranchnameSpecified() 65 | { 66 | $this->expectBuildExceptionContaining('noBranchname', 67 | 'Branchname dir is required', 68 | '"branchname" is required parameter'); 69 | } 70 | 71 | public function testTrackParameter() 72 | { 73 | $repository = PHING_TEST_TMP . '/git'; 74 | 75 | $this->executeTarget('trackParamSet'); 76 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 77 | $this->assertInLogs( 'git-branch output: Branch track-param-set set up to track local branch master.'); 78 | } 79 | 80 | public function testNoTrackParameter() 81 | { 82 | $repository = PHING_TEST_TMP . '/git'; 83 | 84 | $this->executeTarget('noTrackParamSet'); 85 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 86 | $this->assertInLogs('git-branch output: '); // no output actually 87 | } 88 | 89 | public function testSetUpstreamParameter() 90 | { 91 | $repository = PHING_TEST_TMP . '/git'; 92 | 93 | $this->executeTarget('setUpstreamParamSet'); 94 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 95 | $this->assertInLogs('Branch set-upstream-param-set set up to track local branch master.'); // no output actually 96 | } 97 | 98 | public function testForceParameter() 99 | { 100 | $repository = PHING_TEST_TMP . '/git'; 101 | 102 | $this->executeTarget('forceParamSet'); 103 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 104 | $this->assertInLogs('git-branch output: '); // no output actually 105 | } 106 | 107 | public function testDeleteBranch() 108 | { 109 | $repository = PHING_TEST_TMP . '/git'; 110 | 111 | $this->executeTarget('deleteBranch'); 112 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 113 | $this->assertInLogs('Branch delete-branch-1 set up to track local branch master.'); 114 | $this->assertInLogs('Branch delete-branch-2 set up to track local branch master.'); 115 | $this->assertInLogs('Deleted branch delete-branch-1'); 116 | $this->assertInLogs('Deleted branch delete-branch-2'); 117 | } 118 | 119 | public function testMoveBranch() 120 | { 121 | $repository = PHING_TEST_TMP . '/git'; 122 | 123 | $this->executeTarget('moveBranch'); 124 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 125 | // try to delete new branch (thus understanding that rename worked) 126 | $this->assertInLogs('Deleted branch move-branch-2'); 127 | } 128 | 129 | public function testForceMoveBranch() 130 | { 131 | $repository = PHING_TEST_TMP . '/git'; 132 | 133 | $this->executeTarget('forceMoveBranch'); 134 | $this->assertInLogs('git-branch: branch "' . $repository . '" repository'); 135 | // try to delete new branch (thus understanding that rename worked) 136 | $this->assertInLogs('Deleted branch move-branch-2'); 137 | } 138 | 139 | public function testForceMoveBranchNoNewbranch() 140 | { 141 | $repository = PHING_TEST_TMP . '/git'; 142 | 143 | $this->expectBuildExceptionContaining('forceMoveBranchNoNewbranch', 144 | 'New branch name is required in branch move', 145 | '"newbranch" is required parameter'); 146 | } 147 | 148 | public function testMoveBranchNoNewbranch() 149 | { 150 | $repository = PHING_TEST_TMP . '/git'; 151 | 152 | $this->expectBuildExceptionContaining('moveBranchNoNewbranch', 153 | 'New branch name is required in branch move', 154 | '"newbranch" is required parameter'); 155 | } 156 | 157 | 158 | } 159 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitBranchTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 35 | 39 | 40 | 41 | 42 | 45 | 49 | 50 | 51 | 52 | 55 | 59 | 60 | 61 | 62 | 65 | 68 | 69 | 74 | 75 | 76 | 77 | 80 | 83 | 86 | 90 | 94 | 95 | 96 | 97 | 100 | 103 | 108 | 112 | 113 | 114 | 115 | 118 | 121 | 126 | 130 | 131 | 132 | 133 | 136 | 139 | 143 | 144 | 145 | 146 | 149 | 152 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitCheckoutTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitCheckoutTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitCheckoutTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitCheckoutTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitCheckoutTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testCheckoutExistingBranch() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('checkoutExistingBranch'); 54 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 55 | $this->assertInLogs('git-branch output: Branch co-branch set up to track remote branch master from origin.'); 56 | // @todo - actually make sure that Ebihara updates code to return (not 57 | // echo output from $command->execute() 58 | //$this->assertInLogs("Switched to branch 'test'"); 59 | $this->assertInLogs('git-checkout output: '); // no output actually 60 | } 61 | 62 | public function testCheckoutNonExistingBranch() 63 | { 64 | $this->expectBuildExceptionContaining('checkoutNonExistingBranch', 65 | 'Checkout of non-existent repo is impossible', 66 | 'Task execution failed'); 67 | } 68 | 69 | public function testNoRepositorySpecified() 70 | { 71 | $this->expectBuildExceptionContaining('noRepository', 72 | 'Repo dir is required', 73 | '"repository" is required parameter'); 74 | } 75 | 76 | public function testNoBranchnameSpecified() 77 | { 78 | $this->expectBuildExceptionContaining('noBranchname', 79 | 'Branchname is required', 80 | '"branchname" is required parameter'); 81 | } 82 | 83 | public function testCheckoutMerge() 84 | { 85 | $repository = PHING_TEST_TMP . '/git'; 86 | $this->executeTarget('checkoutMerge'); 87 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 88 | $this->assertInLogs('git-branch output: Branch co-branch set up to track remote branch master from origin.'); 89 | $this->assertInLogs('git-branch output: Deleted branch master'); 90 | } 91 | 92 | public function testCheckoutCreateBranch() 93 | { 94 | $repository = PHING_TEST_TMP . '/git'; 95 | $this->executeTarget('checkoutCreateBranch'); 96 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 97 | $this->assertInLogs('git-checkout output: Branch co-create-branch set up to track remote branch master from origin.'); 98 | $this->assertInLogs('git-branch output: Deleted branch co-create-branch'); 99 | } 100 | 101 | public function testForceCheckoutCreateBranch() 102 | { 103 | $repository = PHING_TEST_TMP . '/git'; 104 | $this->executeTarget('checkoutForceCreateBranch'); 105 | $this->assertInLogs('git-checkout: checkout "' . $repository . '" repository'); 106 | $this->assertInLogs('git-branch output: Deleted branch co-create-branch'); 107 | } 108 | 109 | public function testForceCheckoutCreateBranchFailed() 110 | { 111 | $this->expectBuildExceptionContaining('checkoutForceCreateBranchFailed', 112 | 'Branch already exists', 113 | 'Task execution failed.'); 114 | } 115 | 116 | 117 | } 118 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitCheckoutTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 19 | 22 | 23 | 24 | 25 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 49 | 53 | 56 | 57 | 58 | 59 | 62 | 67 | 68 | 71 | 74 | 75 | 76 | 77 | 80 | 84 | 85 | 88 | 89 | 93 | 94 | 97 | 100 | 101 | 102 | 103 | 106 | 110 | 111 | 114 | 115 | 119 | 120 | 121 | 122 | 123 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitCloneTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitCloneTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitCloneTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitCloneTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | // set temp directory used by test cases 35 | mkdir(PHING_TEST_TMP . '/git'); 36 | 37 | $this->configureProject(__DIR__ . '/GitCloneTaskTest.xml'); 38 | } 39 | 40 | public function tearDown() 41 | { 42 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 43 | } 44 | 45 | public function testWrongRepository() 46 | { 47 | $this->expectBuildExceptionContaining('wrongRepository', 48 | 'Repository not readable', 49 | 'The remote end hung up unexpectedly'); 50 | } 51 | 52 | public function testWrongTargetPath() 53 | { 54 | $this->expectBuildExceptionContaining('wrongTargetPath', 55 | 'Repository not readable', 56 | 'You must specify readable directory as repository'); 57 | } 58 | 59 | public function testGitClone() 60 | { 61 | $repository = PHING_TEST_TMP . '/git'; 62 | $gitFilesDir = $repository . '/.git'; 63 | $this->executeTarget('gitClone'); 64 | 65 | $this->assertInLogs('git-clone: cloning "git://github.com/farazdagi/phing-tests.git" repository to "' . $repository . '" directory'); 66 | $this->assertTrue(is_dir($repository)); 67 | $this->assertTrue(is_dir($gitFilesDir)); 68 | // test that file is actully cloned 69 | $this->assertTrue(is_readable($repository . '/README')); 70 | } 71 | 72 | public function testGitCloneBare() 73 | { 74 | $repository = PHING_TEST_TMP . '/git'; 75 | $gitFilesDir = $repository . '/.git'; 76 | $this->executeTarget('gitCloneBare'); 77 | $this->assertInLogs('git-clone: cloning (bare) "git://github.com/farazdagi/phing-tests.git" repository to "' . $repository . '" directory'); 78 | $this->assertTrue(is_dir($repository)); 79 | $this->assertTrue(is_dir($repository . '/branches')); 80 | $this->assertTrue(is_dir($repository . '/info')); 81 | $this->assertTrue(is_dir($repository . '/hooks')); 82 | $this->assertTrue(is_dir($repository . '/refs')); 83 | } 84 | 85 | public function testNoRepositorySpecified() 86 | { 87 | $this->expectBuildExceptionContaining('noRepository', 88 | 'Repo dir is required', 89 | '"repository" is required parameter'); 90 | } 91 | 92 | public function testNoTargetPathSpecified() 93 | { 94 | $this->expectBuildExceptionContaining('noTargetPath', 95 | 'Target path is required', 96 | '"targetPath" is required parameter'); 97 | } 98 | 99 | 100 | } 101 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitCloneTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitFetchTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitFetchTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitFetchTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitFetchTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitFetchTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-fetch: branch "' . $repository . '" repository'); 55 | $this->assertInLogs('git-fetch output: '); // no output actually 56 | } 57 | 58 | public function testFetchAllRemotes() 59 | { 60 | $repository = PHING_TEST_TMP . '/git'; 61 | $this->executeTarget('fetchAllRemotes'); 62 | $this->assertInLogs('git-fetch: branch "' . $repository . '" repository'); 63 | $this->assertInLogs('git-fetch output: Fetching origin'); 64 | } 65 | 66 | public function testNoRepositorySpecified() 67 | { 68 | $this->expectBuildExceptionContaining('noRepository', 69 | 'Repo dir is required', 70 | '"repository" is required parameter'); 71 | } 72 | 73 | public function testNoTargetSpecified() 74 | { 75 | $this->expectBuildExceptionContaining('noTarget', 76 | 'Target is required', 77 | 'No remote repository specified'); 78 | } 79 | 80 | public function testRefspecSet() 81 | { 82 | $repository = PHING_TEST_TMP . '/git'; 83 | $this->executeTarget('refspecSet'); 84 | $this->assertInLogs('git-fetch: branch "' . $repository . '" repository'); 85 | $this->assertInLogs('git-fetch output: '); 86 | $this->assertInLogs('Deleted branch refspec-branch'); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitFetchTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 17 | 18 | 19 | 20 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 40 | 45 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitGcTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitGcTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitGcTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitGcTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitGcTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-gc: cleaning up "' . $repository . '" repository'); 55 | } 56 | 57 | public function testNoRepositorySpecified() 58 | { 59 | $this->expectBuildExceptionContaining('noRepository', 60 | 'Repo dir is required', 61 | '"repository" is required parameter'); 62 | } 63 | 64 | public function testAutoParameter() 65 | { 66 | $repository = PHING_TEST_TMP . '/git'; 67 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 68 | 69 | $this->executeTarget('autoParamSet'); 70 | $this->assertInLogs($msg); 71 | } 72 | 73 | public function testNoPruneParameter() 74 | { 75 | $repository = PHING_TEST_TMP . '/git'; 76 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 77 | 78 | $this->executeTarget('nopruneParamSet'); 79 | $this->assertInLogs($msg); 80 | } 81 | 82 | public function testAggressiveParameter() 83 | { 84 | $repository = PHING_TEST_TMP . '/git'; 85 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 86 | 87 | $this->executeTarget('aggressiveParamSet'); 88 | $this->assertInLogs($msg); 89 | } 90 | 91 | public function testPruneParameter() 92 | { 93 | $repository = PHING_TEST_TMP . '/git'; 94 | $msg = 'git-gc: cleaning up "' . $repository . '" repository'; 95 | 96 | $this->executeTarget('pruneParamSet'); 97 | $this->assertInLogs($msg); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitGcTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 32 | 33 | 34 | 35 | 38 | 40 | 41 | 42 | 43 | 46 | 48 | 49 | 50 | 51 | 54 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitInitTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitInitTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitInitTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitInitTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | // set temp directory used by test cases 35 | mkdir(PHING_TEST_TMP . '/git'); 36 | 37 | $this->configureProject(__DIR__ . '/GitInitTaskTest.xml'); 38 | } 39 | 40 | public function tearDown() 41 | { 42 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 43 | } 44 | 45 | public function testWrongRepository() 46 | { 47 | $this->expectBuildExceptionContaining('wrongRepository', 48 | 'Repository directory not readable', 49 | 'You must specify readable directory as repository.'); 50 | } 51 | 52 | public function testGitInit() 53 | { 54 | $repository = PHING_TEST_TMP . '/git'; 55 | $gitFilesDir = $repository . '/.git'; 56 | $this->executeTarget('gitInit'); 57 | 58 | $this->assertInLogs('git-init: initializing "' . $repository . '" repository'); 59 | $this->assertTrue(is_dir($repository)); 60 | $this->assertTrue(is_dir($gitFilesDir)); 61 | } 62 | 63 | public function testGitInitBare() 64 | { 65 | $repository = PHING_TEST_TMP . '/git'; 66 | $gitFilesDir = $repository . '/.git'; 67 | $this->executeTarget('gitInitBare'); 68 | $this->assertInLogs('git-init: initializing (bare) "' . $repository . '" repository'); 69 | $this->assertTrue(is_dir($repository)); 70 | $this->assertTrue(is_dir($repository . '/branches')); 71 | $this->assertTrue(is_dir($repository . '/info')); 72 | $this->assertTrue(is_dir($repository . '/hooks')); 73 | $this->assertTrue(is_dir($repository . '/refs')); 74 | } 75 | 76 | public function testNoRepositorySpecified() 77 | { 78 | $this->expectBuildExceptionContaining('noRepository', 79 | 'Repo dir is required', 80 | '"repository" is required parameter'); 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitInitTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitLogTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 23 | 31 | 32 | 33 | 34 | 35 | 38 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 56 | 57 | 58 | 59 | 60 | 63 | 67 | 68 | 69 | 70 | 71 | 74 | 79 | 80 | 81 | 82 | 83 | 86 | 91 | 92 | 93 | 94 | 95 | 98 | 101 | 102 | 103 | 104 | 105 | 108 | 111 | 112 | 113 | 114 | 115 | 118 | 121 | 122 | 123 | 124 | 125 | 128 | 131 | 132 | 133 | 134 | 135 | 138 | 141 | 142 | 143 | 144 | 145 | 148 | 151 | 152 | 153 | 154 | 155 | 158 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitMergeTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitMergeTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitMergeTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitMergeTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitMergeTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-merge: replaying "merge-test-1 merge-test-2" commits'); 55 | $this->assertInLogs('git-merge output: Already up-to-date.'); 56 | } 57 | 58 | public function testNoCommitSet() 59 | { 60 | $repository = PHING_TEST_TMP . '/git'; 61 | $this->executeTarget('noCommitSet'); 62 | $this->assertInLogs('git-merge: replaying "6dbaf4508e75dcd426b5b974a67c462c70d46e1f" commits'); 63 | $this->assertInLogs('git-merge output: Already up-to-date.'); 64 | } 65 | 66 | public function testRemoteSet() 67 | { 68 | $repository = PHING_TEST_TMP . '/git'; 69 | $this->executeTarget('remoteSet'); 70 | $this->assertInLogs('git-merge: replaying "6dbaf4508e75dcd426b5b974a67c462c70d46e1f" commits'); 71 | $this->assertInLogs('git-merge output: Already up-to-date.'); 72 | } 73 | 74 | public function testFastForwardCommitSet() 75 | { 76 | $repository = PHING_TEST_TMP . '/git'; 77 | $this->executeTarget('fastForwardCommitSet'); 78 | $this->assertInLogs('git-merge command: /usr/bin/git merge --no-ff \'origin/master\''); 79 | $this->assertInLogs('git-merge: replaying "origin/master" commits'); 80 | $this->assertInLogs('Merge remote-tracking branch \'origin/master\' into merge-test-1'); 81 | } 82 | 83 | public function testNoRepositorySpecified() 84 | { 85 | $this->expectBuildExceptionContaining('noRepository', 86 | 'Repo dir is required', 87 | '"repository" is required parameter'); 88 | } 89 | 90 | public function testNoRemotesSpecified() 91 | { 92 | $this->expectBuildExceptionContaining('noRemotes', 93 | 'At least one commit is required', 94 | '"remote" is required parameter'); 95 | } 96 | 97 | public function testWrongStrategySet() 98 | { 99 | $this->expectBuildExceptionContaining('wrongStrategySet', 100 | 'Wrong strategy passed', 'Could not find merge strategy \'plain-wrong\''); 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitMergeTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 16 | 19 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 40 | 41 | 44 | 48 | 49 | 50 | 51 | 54 | 55 | 58 | 62 | 63 | 64 | 65 | 68 | 69 | 72 | 75 | 76 | 77 | 78 | 81 | 84 | 87 | 91 | 96 | 97 | 98 | 99 | 102 | 103 | 106 | 109 | 110 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitPullTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitPullTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitPullTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitPullTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitPullTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | /*$repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 55 | $this->assertInLogs('git-pull: complete'); 56 | $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3'); 57 | // make sure that foofile from foobranch made it to master 58 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 59 | } 60 | 61 | public function testAllParamsSetRebase() 62 | { 63 | /*$repository = PHING_TEST_TMP . '/git'; 64 | $this->executeTarget('allParamsSetRebase'); 65 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 66 | $this->assertInLogs('git-pull: complete'); 67 | $this->assertInLogs('git-pull output: First, rewinding head to replay your work on top of it...'); 68 | $this->assertInLogs('Fast-forwarded master to 6ad2ea37a26ce3534073e89043f890c054fddb20.'); 69 | // make sure that foofile from foobranch made it to master 70 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 71 | } 72 | 73 | public function testAllReposSet() 74 | { 75 | $repository = PHING_TEST_TMP . '/git'; 76 | $this->executeTarget('allReposSet'); 77 | $this->assertInLogs('git-pull: fetching from all remotes'); 78 | $this->assertInLogs('git-pull: complete'); 79 | } 80 | 81 | public function testTagsSet() 82 | { 83 | /*$repository = PHING_TEST_TMP . '/git'; 84 | $this->executeTarget('tagsSet'); 85 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 86 | $this->assertInLogs('git-pull: complete'); 87 | $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3'); 88 | // make sure that foofile from foobranch made it to master 89 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 90 | } 91 | 92 | public function testAppendSet() 93 | { 94 | $repository = PHING_TEST_TMP . '/git'; 95 | $this->executeTarget('appendSet'); 96 | $this->assertInLogs('git-pull: fetching from all remotes'); 97 | $this->assertInLogs('git-pull: complete'); 98 | $this->assertInLogs('git-pull output: Already up-to-date.'); 99 | } 100 | 101 | public function testNoTagsSet() 102 | { 103 | /*$repository = PHING_TEST_TMP . '/git'; 104 | $this->executeTarget('noTagsSet'); 105 | $this->assertInLogs('git-pull: pulling from origin foobranch'); 106 | $this->assertInLogs('git-pull: complete'); 107 | $this->assertInLogs('git-pull output: Updating 6dbaf45..6ad2ea3'); 108 | // make sure that foofile from foobranch made it to master 109 | $this->assertTrue(is_readable($repository . '/foofile'));*/ 110 | } 111 | 112 | public function testNoRepositorySpecified() 113 | { 114 | $this->expectBuildExceptionContaining('noRepository', 115 | 'Repo dir is required', 116 | '"repository" is required parameter'); 117 | } 118 | 119 | public function testNoSourceSpecified() 120 | { 121 | $this->expectBuildExceptionContaining('noSource', 122 | 'At least one source must be provided', 123 | 'No source repository specified'); 124 | } 125 | 126 | public function testWrongStrategySet() 127 | { 128 | $this->expectBuildExceptionContaining('wrongStrategySet', 129 | 'Wrong strategy passed', 'Could not find merge strategy \'plain-wrong\''); 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitPullTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 20 | 21 | 22 | 23 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 41 | 43 | 44 | 45 | 46 | 49 | 54 | 55 | 56 | 57 | 60 | 62 | 63 | 64 | 65 | 68 | 70 | 71 | 72 | 73 | 76 | 80 | 81 | 82 | 83 | 86 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitPushTaskTest.php: -------------------------------------------------------------------------------- 1 | . 20 | */ 21 | 22 | require_once 'phing/BuildFileTest.php'; 23 | require_once '../classes/phing/tasks/ext/git/GitPushTask.php'; 24 | require_once dirname(__FILE__) . '/GitTestsHelper.php'; 25 | 26 | /** 27 | * @author Victor Farazdagi 28 | * @version $Id: GitPushTaskTest.php 1179 2011-06-22 11:31:08Z mp $ 29 | * @package phing.tasks.ext 30 | */ 31 | class GitPushTaskTest extends BuildFileTest { 32 | 33 | public function setUp() { 34 | if (is_readable(PHING_TEST_TMP . '/git')) { 35 | // make sure we purge previously created directory 36 | // if left-overs from previous run are found 37 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 38 | } 39 | // set temp directory used by test cases 40 | mkdir(PHING_TEST_TMP . '/git'); 41 | 42 | $this->configureProject(__DIR__ . '/GitPushTaskTest.xml'); 43 | } 44 | 45 | public function tearDown() 46 | { 47 | GitTestsHelper::rmdir(PHING_TEST_TMP . '/git'); 48 | } 49 | 50 | public function testAllParamsSet() 51 | { 52 | $repository = PHING_TEST_TMP . '/git'; 53 | $this->executeTarget('allParamsSet'); 54 | $this->assertInLogs('git-push: pushing to origin master:foobranch'); 55 | $this->assertInLogs('git-push: complete'); 56 | } 57 | 58 | public function testAllReposSet() 59 | { 60 | $repository = PHING_TEST_TMP . '/git'; 61 | $this->executeTarget('allReposSet'); 62 | $this->assertInLogs('git-push: push to all refs'); 63 | $this->assertInLogs('git-push: complete'); 64 | } 65 | 66 | public function testTagsSet() 67 | { 68 | $repository = PHING_TEST_TMP . '/git'; 69 | $this->executeTarget('tagsSet'); 70 | $this->assertInLogs('git-push: pushing to origin master:foobranch'); 71 | $this->assertInLogs('git-push: complete'); 72 | } 73 | 74 | public function testDeleteSet() 75 | { 76 | $repository = PHING_TEST_TMP . '/git'; 77 | $this->executeTarget('deleteSet'); 78 | $this->assertInLogs('git-push: pushing to origin master:newbranch'); 79 | $this->assertInLogs('git-push: branch delete requested'); 80 | $this->assertInLogs('git-push: complete'); 81 | } 82 | 83 | public function testMirrorSet() 84 | { 85 | $repository = PHING_TEST_TMP . '/git'; 86 | $this->executeTarget('mirrorSet'); 87 | $this->assertInLogs('git-push: mirror all refs'); 88 | $this->assertInLogs('git-push: complete'); 89 | } 90 | 91 | public function testNoRepositorySpecified() 92 | { 93 | $this->expectBuildExceptionContaining('noRepository', 94 | 'Repo dir is required', 95 | '"repository" is required parameter'); 96 | } 97 | 98 | public function testWrongRepo() 99 | { 100 | $this->expectBuildExceptionContaining('wrongRepo', 101 | 'Repo dir is wrong', 102 | 'You must specify readable directory as repository.'); 103 | } 104 | 105 | public function testNoDestinationSpecified() 106 | { 107 | $this->expectBuildExceptionContaining('noDestination', 108 | 'No source set', 109 | 'At least one destination must be provided'); 110 | } 111 | 112 | } 113 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitPushTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file should only be run via a testcase 9 | 10 | 11 | 12 | 15 | 19 | 20 | 21 | 22 | 25 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 41 | 42 | 43 | 44 | 47 | 49 | 50 | 51 | 52 | 55 | 58 | 59 | 60 | 61 | 64 | 67 | 68 | 69 | 72 | 75 | 79 | 80 | 81 | 82 | 85 | 88 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /test/phingistrano/GitTasks/GitTestsHelper.php: -------------------------------------------------------------------------------- 1 | 5259486) { 48 | $returndate = round($timediff / 2629744) . " months ago"; 49 | } else { 50 | $returndate = round($timediff / 604900) . " weeks ago"; 51 | } 52 | 53 | return $returndate; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /test/phingistrano/ScpTask/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 0 5 | http://svn.phing.info/branches/2.5/test/classes/phing/tasks/ext/ScpTask 6 | http://svn.phing.info 7 | add 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 34c17c5f-800b-0410-92ba-a69295604261 28 | 29 | ScpTaskTest.xml 30 | file 31 | 32 | 33 | 34 | add 35 | 36 | ScpTestHelper.php 37 | file 38 | 39 | 40 | 41 | add 42 | 43 | ScpTaskTest.php 44 | file 45 | 46 | 47 | 48 | add 49 | 50 | -------------------------------------------------------------------------------- /test/phingistrano/ScpTask/ScpTaskTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | This file should only be run via a testcase 24 | 25 | 26 | 27 | 39 | 40 | 41 | 42 | 47 | 48 | 49 | 50 | 57 | 58 | 59 | 60 | 67 | 68 | 69 | 70 | 79 | 80 | 81 | 82 | 88 | 89 | 90 | 91 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /test/phingistrano/ScpTask/ScpTestHelper.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | This file should only be run via a testcase 21 | 22 | 23 | 24 | 34 | 35 | 36 | 37 | 41 | 42 | 43 | 44 | 49 | 50 | 51 | 52 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /test/phingistrano/SshTask/SshTestHelper.php: -------------------------------------------------------------------------------- 1 |