3 include_once __DIR__ . '/LocalFileTestCase.php';
6 * Tests for php files in the 'demo' directory
8 class DemoFilesTest extends PhpXmlRpc_LocalFileTestCase
10 public function set_up()
12 $this->args = argParser::getArgs();
14 $this->baseUrl = $this->args['HTTPSERVER'] . str_replace( '/demo/server/server.php', '/demo/', $this->args['HTTPURI'] );
16 $this->coverageScriptUrl = 'http://' . $this->args['HTTPSERVER'] . '/' . str_replace( '/demo/server/server.php', 'tests/phpunit_coverage.php', $this->args['HTTPURI'] );
19 public function testAgeSort()
21 $page = $this->request('client/agesort.php');
24 public function testGetStateName()
26 $page = $this->request('client/getstatename.php');
27 $page = $this->request('client/getstatename.php', 'POST', array('stateno' => '1'));
30 public function testIntrospect()
32 $page = $this->request('client/introspect.php');
35 public function testMail()
37 $page = $this->request('client/mail.php');
38 $page = $this->request('client/mail.php', 'POST', array(
48 public function testProxy()
50 $page = $this->request('client/proxy.php', 'GET', null, true);
53 public function testWhich()
55 $page = $this->request('client/which.php');
58 public function testWrap()
60 $page = $this->request('client/wrap.php');
63 public function testDiscussServer()
65 /// @todo add a couple of proper xmlrpc calls, too
66 $page = $this->request('server/discuss.php');
67 $this->assertStringContainsString('<name>faultCode</name>', $page);
68 $this->assertRegexp('#<int>10(5|3)</int>#', $page);
71 public function testProxyServer()
73 /// @todo add a couple of proper xmlrpc calls, too
74 $page = $this->request('server/proxy.php');
75 $this->assertStringContainsString('<name>faultCode</name>', $page);
76 $this->assertRegexp('#<int>10(5|3)</int>#', $page);