cvs: pecl /svn/tests cat.phpt log10.phpt log6.phpt log9.phpt
| From: | Alan Knowles | Date: | Wed, 30 Jan 2008 04:09:15 +0000 |
| Subject: | cvs: pecl /svn/tests cat.phpt log10.phpt log6.phpt log9.phpt | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-9636@lists.php.net to get a copy of this message | ||
alan_k Wed Jan 30 04:09:15 2008 UTC
Added files:
/pecl/svn/tests cat.phpt log10.phpt log9.phpt
Modified files:
/pecl/svn/tests log6.phpt
Log:
updated tests by develar
http://cvs.php.net/viewvc.cgi/pecl/svn/tests/log6.phpt?r1=1.2&r2=1.3&diff_format=u
Index: pecl/svn/tests/log6.phpt
diff -u pecl/svn/tests/log6.phpt:1.2 pecl/svn/tests/log6.phpt:1.3
--- pecl/svn/tests/log6.phpt:1.2 Tue Jan 29 05:13:42 2008
+++ pecl/svn/tests/log6.phpt Wed Jan 30 04:09:15 2008
@@ -1,30 +1,16 @@
--TEST--
-Svn::log() --revision ARG[:ARG] (depends on the Svn::checkout())
+Svn::log() --revision ARG[:ARG] (depends on the Svn::checkout()) (repository url)
--FILE--
<?php
-$repository_url = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'r';
-$url = $repository_url . DIRECTORY_SEPARATOR . 'renamed_test';
+$url = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'r' .
DIRECTORY_SEPARATOR . 'renamed_test';
var_dump(Svn::log($url, SvnRevision::HEAD));
var_dump(Svn::log($url, SvnRevision::HEAD, 2));
var_dump(Svn::log($url, 2, SvnRevision::HEAD));
var_dump(Svn::log($url,4, 2));
var_dump(Svn::log($url, 4));
var_dump(Svn::log($url, 4, SvnRevision::INITIAL));
-var_dump(Svn::log($url, 4, 0)); // use SvnRevision::INITIAL, not magic number. it is only a test*/
-
-$wc_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wc';
-Svn::checkout($repository_url, $wc_path);
-var_dump(Svn::log($wc_path, SvnRevision::BASE, SvnRevision::PREV));
-var_dump(Svn::log($wc_path, SvnRevision::BASE, SvnRevision::COMMITTED));
-var_dump(Svn::log($wc_path, SvnRevision::BASE));
-
-?>
---CLEAN--
-<?php
-
-include('utilities.php');
-delete_directory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wc');
+var_dump(Svn::log($url, 4, 0)); // use SvnRevision::INITIAL, not magic number. it is only a test
?>
--EXPECT--
@@ -184,54 +170,4 @@
["date"]=>
string(27) "2008-01-25T17:36:40.979851Z"
}
-}
-array(2) {
- [0]=>
- array(4) {
- ["rev"]=>
- int(5)
- ["author"]=>
- string(7) "develar"
- ["msg"]=>
- string(8) "Who here"
- ["date"]=>
- string(27) "2008-01-26T08:59:34.584346Z"
- }
- [1]=>
- array(4) {
- ["rev"]=>
- int(4)
- ["author"]=>
- string(7) "Develar"
- ["msg"]=>
- string(0) ""
- ["date"]=>
- string(27) "2008-01-25T17:39:35.470636Z"
- }
-}
-array(1) {
- [0]=>
- array(4) {
- ["rev"]=>
- int(5)
- ["author"]=>
- string(7) "develar"
- ["msg"]=>
- string(8) "Who here"
- ["date"]=>
- string(27) "2008-01-26T08:59:34.584346Z"
- }
-}
-array(1) {
- [0]=>
- array(4) {
- ["rev"]=>
- int(5)
- ["author"]=>
- string(7) "develar"
- ["msg"]=>
- string(8) "Who here"
- ["date"]=>
- string(27) "2008-01-26T08:59:34.584346Z"
- }
}
\ No newline at end of file
http://cvs.php.net/viewvc.cgi/pecl/svn/tests/cat.phpt?view=markup&rev=1.1
Index: pecl/svn/tests/cat.phpt
+++ pecl/svn/tests/cat.phpt
--TEST--
Svn::cat()
--FILE--
<?php
function get_cat($url)
{
ob_start();
var_dump(Svn::cat($url));
var_dump(Svn::cat($url, SvnRevision::HEAD));
var_dump(Svn::cat($url, 1));
return ob_get_clean();
}
$repository_url = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'r';
$filename = 'renamed_test';
$url = $repository_url . DIRECTORY_SEPARATOR . $filename;
$repository_result = get_cat($url);
echo $repository_result;
$wc_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wc';
Svn::checkout($repository_url, $wc_path);
$url = $wc_path . DIRECTORY_SEPARATOR . $filename;
var_dump(get_cat($url) === $repository_result);
var_dump(Svn::cat($url, SvnRevision::BASE));
/* Warning: Svn::cat(): svn error(s) occured 195012 (Two versioned resources are unrelated) Unable
to find repository location for '/home/develar/pecl_svn/tests/wc/renamed_test' in revision
3 in /home/develar/pecl_svn/tests/cat.phpt on line 27 */
ini_set('error_reporting', 0);
var_dump(Svn::cat($url, SvnRevision::PREV));
?>
--CLEAN--
<?php
include('utils.inc');
delete_directory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wc');
?>
--EXPECT--
string(3) "who"
string(3) "who"
string(4) "rev1"
bool(true)
string(3) "who"
bool(false)
http://cvs.php.net/viewvc.cgi/pecl/svn/tests/log10.phpt?view=markup&rev=1.1
Index: pecl/svn/tests/log10.phpt
+++ pecl/svn/tests/log10.phpt
--TEST--
Svn::log() --revision ARG[:ARG] (depends on the Svn::checkout()) (working copy url)
--FILE--
<?php
$wc_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wc';
Svn::checkout('file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'r',
$wc_path);
var_dump(Svn::log($wc_path, SvnRevision::BASE, SvnRevision::PREV));
var_dump(Svn::log($wc_path, SvnRevision::BASE, SvnRevision::COMMITTED));
var_dump(Svn::log($wc_path, SvnRevision::BASE));
?>
--CLEAN--
<?php
include('utils.inc');
delete_directory(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wc');
?>
--EXPECT--
array(2) {
[0]=>
array(4) {
["rev"]=>
int(5)
["author"]=>
string(7) "develar"
["msg"]=>
string(8) "Who here"
["date"]=>
string(27) "2008-01-26T08:59:34.584346Z"
}
[1]=>
array(4) {
["rev"]=>
int(4)
["author"]=>
string(7) "Develar"
["msg"]=>
string(0) ""
["date"]=>
string(27) "2008-01-25T17:39:35.470636Z"
}
}
array(1) {
[0]=>
array(4) {
["rev"]=>
int(5)
["author"]=>
string(7) "develar"
["msg"]=>
string(8) "Who here"
["date"]=>
string(27) "2008-01-26T08:59:34.584346Z"
}
}
array(1) {
[0]=>
array(4) {
["rev"]=>
int(5)
["author"]=>
string(7) "develar"
["msg"]=>
string(8) "Who here"
["date"]=>
string(27) "2008-01-26T08:59:34.584346Z"
}
}
http://cvs.php.net/viewvc.cgi/pecl/svn/tests/log9.phpt?view=markup&rev=1.1
Index: pecl/svn/tests/log9.phpt
+++ pecl/svn/tests/log9.phpt
--TEST--
Svn::log() --revision ARG:ARG --quiet
--FILE--
<?php
$url = 'file://' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'r' .
DIRECTORY_SEPARATOR . 'renamed_test';
var_dump(Svn::log($url, SvnRevision::HEAD, SvnRevision::INITIAL, null, Svn::OMIT_MESSAGES));
var_dump(Svn::log($url, SvnRevision::HEAD, 0, null, Svn::OMIT_MESSAGES)); // use
SvnRevision::INITIAL, not magic number. it is only a test
?>
--EXPECT--
array(3) {
[0]=>
array(3) {
["rev"]=>
int(4)
["author"]=>
string(7) "Develar"
["date"]=>
string(27) "2008-01-25T17:39:35.470636Z"
}
[1]=>
array(3) {
["rev"]=>
int(2)
["author"]=>
string(7) "Develar"
["date"]=>
string(27) "2008-01-25T17:38:14.748264Z"
}
[2]=>
array(3) {
["rev"]=>
int(1)
["author"]=>
string(7) "Develar"
["date"]=>
string(27) "2008-01-25T17:36:40.979851Z"
}
}
array(3) {
[0]=>
array(3) {
["rev"]=>
int(4)
["author"]=>
string(7) "Develar"
["date"]=>
string(27) "2008-01-25T17:39:35.470636Z"
}
[1]=>
array(3) {
["rev"]=>
int(2)
["author"]=>
string(7) "Develar"
["date"]=>
string(27) "2008-01-25T17:38:14.748264Z"
}
[2]=>
array(3) {
["rev"]=>
int(1)
["author"]=>
string(7) "Develar"
["date"]=>
string(27) "2008-01-25T17:36:40.979851Z"
}
}