Example #1
0
 /**
  * Tests functionality of both get() and save()
  */
 public function testGetSave()
 {
     if (!is_writeable('./')) {
         $this->markTestIncomplete('Directory no writable');
     }
     $this->assertTrue(Server\Cache::save($this->_file, $this->_server));
     $expected = $this->_server->listMethods();
     $server = new Server();
     $this->assertTrue(Server\Cache::get($this->_file, $server));
     $actual = $server->listMethods();
     $this->assertSame($expected, $actual);
 }
Example #2
0
 /**
  * Tests functionality of both get() and save()
  */
 public function testGetSave()
 {
     if (!is_writeable('./')) {
         throw new PHPUnit_Framework_IncompleteTestError('Directory not writeable');
     }
     $this->assertTrue(Zend_XmlRpc_Server_Cache::save($this->_file, $this->_server));
     $expected = $this->_server->listMethods();
     $server = new Zend_XmlRpc_Server();
     $this->assertTrue(Zend_XmlRpc_Server_Cache::get($this->_file, $server));
     $actual = $server->listMethods();
     $this->assertSame($expected, $actual);
 }
Example #3
0
 /**
  * listMethods() test
  *
  * Call as method call 
  *
  * Returns: array 
  */
 public function testListMethods()
 {
     $methods = $this->_server->listMethods();
     $this->assertTrue(is_array($methods));
     $this->assertTrue(in_array('system.listMethods', $methods));
     $this->assertTrue(in_array('system.methodHelp', $methods));
     $this->assertTrue(in_array('system.methodSignature', $methods));
     $this->assertTrue(in_array('system.multicall', $methods));
 }
Example #4
0
 /**
  * Tests functionality of both get() and save()
  *
  * @return void
  */
 public function testGetSave()
 {
     if (!is_writeable(dirname(__FILE__))) {
         $this->markTestIncomplete('Directory no writable');
     }
     $this->assertTrue(Zym_XmlRpc_Server_Cache::save('cache', $this->_cache, $this->_server));
     $expected = $this->_server->listMethods();
     $server = new Zend_XmlRpc_Server();
     $this->assertTrue(Zym_XmlRpc_Server_Cache::get('cache', $this->_cache, $server));
     $actual = $server->listMethods();
     $this->assertSame($expected, $actual);
 }
 public function testAddFunctionWithExtraArgs()
 {
     $this->_server->addFunction('Zend_XmlRpc_Server_testFunction', 'test', 'arg1');
     $methods = $this->_server->listMethods();
     $this->assertContains('test.Zend_XmlRpc_Server_testFunction', $methods);
 }