3 include_once __DIR__ . '/LocalFileTestCase.php';
5 class DemoFilesTest extends PhpXmlRpc_LocalFileTestCase
7 public function setUp()
9 $this->args = argParser::getArgs();
11 $this->baseUrl = $this->args['LOCALSERVER'] . str_replace( '/demo/server/server.php', '/demo/', $this->args['URI'] );
13 $this->coverageScriptUrl = 'http://' . $this->args['LOCALSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['URI'] );
16 public function testAgeSort()
18 $page = $this->request('client/agesort.php');
21 public function testClient()
23 $page = $this->request('client/client.php');
25 // we could test many more calls to the client demo, but the upstream server is gone anyway...
27 $page = $this->request('client/client.php', 'POST', array('stateno' => '1'));
30 public function testComment()
32 $page = $this->request('client/comment.php');
33 $page = $this->request('client/client.php', 'POST', array('storyid' => '1'));
36 public function testIntrospect()
38 $page = $this->request('client/introspect.php');
41 public function testMail()
43 $page = $this->request('client/mail.php');
44 $page = $this->request('client/client.php', 'POST', array(
55 public function testSimpleCall()
57 $page = $this->request('client/simple_call.php', 'GET', null, true);
60 public function testWhich()
62 $page = $this->request('client/which.php');
65 public function testWrap()
67 $page = $this->request('client/wrap.php');
70 public function testZopeTest()
72 $page = $this->request('client/zopetest.php');
75 public function testDiscussServer()
77 $page = $this->request('server/discuss.php');
78 $this->assertContains('<name>faultCode</name>', $page);
79 $this->assertRegexp('#<int>10(5|3)</int>#', $page);
82 public function testProxyServer()
84 $page = $this->request('server/proxy.php');
85 $this->assertContains('<name>faultCode</name>', $page);
86 $this->assertRegexp('#<int>10(5|3)</int>#', $page);