[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: xmlrpc testsuite.php,1.8,1.9
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: xmlrpc testsuite.php,1.8,1.9 |
Date: |
Sat, 09 Feb 2002 16:16:23 -0500 |
Update of /cvsroot/phpgroupware/xmlrpc
In directory subversions:/tmp/cvs-serv18668
Modified Files:
testsuite.php
Log Message:
add countTheEntities test
Index: testsuite.php
===================================================================
RCS file: /cvsroot/phpgroupware/xmlrpc/testsuite.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** testsuite.php 4 Jan 2002 01:29:53 -0000 1.8
--- testsuite.php 9 Feb 2002 21:16:21 -0000 1.9
***************
*** 108,120 ****
for($i=0; $i<$sz; $i++)
{
! $b=$v->arraymem($i);
! if ($b->scalarval())
! {
! $got.="1";
! }
! else
! {
! $got.="0";
! }
}
$this->assertEquals($answer, $got);
--- 108,120 ----
for($i=0; $i<$sz; $i++)
{
! $b=$v->arraymem($i);
! if($b->scalarval())
! {
! $got.="1";
! }
! else
! {
! $got.="0";
! }
}
$this->assertEquals($answer, $got);
***************
*** 139,142 ****
--- 139,164 ----
$this->assertEquals($sendstring, $v->scalarval());
}
+
+ function countEntities()
+ {
+ $sendstring = "h'fd>onc>>l>>rw&bpu>q>e<v&gxs<ytjzkami<";
+ $f =
CreateObject('phpgwapi.xmlrpcmsg','validator1.countTheEntities',array(
+ CreateObject('phpgwapi.xmlrpcval',$sendstring,
'string')
+ ));
+ $r = $this->client->send($f);
+ $v = $r->value();
+
+ $got = '';
+ $expected = '37210';
+ $expect_array =
array('ctLeftAngleBrackets','ctRightAngleBrackets','ctAmpersands','ctApostrophes','ctQuotes');
+
+ while(list(,$val) = each($expect_array))
+ {
+ $b = $v->structmem($val);
+ $got .= $b->me['int'];
+ }
+
+ $this->assertEquals($expected, $got);
+ }
}
***************
*** 245,248 ****
--- 267,271 ----
$suite->addTest(new TestLocalhost('booleanTest'));
$suite->addTest(new TestLocalhost('base64Test'));
+ $suite->addTest(new TestLocalhost('countEntities'));
$suite->addTest(new TestInvalidHost('test404'));
$suite->addTest(new TestFileCases('stringBug'));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: xmlrpc testsuite.php,1.8,1.9,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: wcm/setup tables_update.inc.php,NONE,1.1 tables_baseline.inc.php,NONE,1.1
- Next by Date:
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121,1.122 class.xmlrpc_server.inc.php,1.23,1.24 class.xmlrpcval.inc.php,1.7,1.8 xml_functions.inc.php,1.22,1.23 xmlrpc.interop.php,1.3,1.4
- Previous by thread:
[Phpgroupware-cvs] CVS: wcm/setup tables_update.inc.php,NONE,1.1 tables_baseline.inc.php,NONE,1.1
- Next by thread:
[Phpgroupware-cvs] CVS: phpgwapi/inc functions.inc.php,1.121,1.122 class.xmlrpc_server.inc.php,1.23,1.24 class.xmlrpcval.inc.php,1.7,1.8 xml_functions.inc.php,1.22,1.23 xmlrpc.interop.php,1.3,1.4
- Index(es):