Exemple #1
0
 public function testShouldReturnFalseWithInvalidCache()
 {
     if (!is_writeable('./')) {
         $this->markTestIncomplete('Directory no writable');
     }
     file_put_contents($this->_file, 'blahblahblah');
     $server = new Server();
     $this->assertFalse(Server\Cache::get($this->_file, $server));
 }
Exemple #2
0
function plugin_xmlrpc_action()
{
    global $use_pingback;
    //$headers = Header::getHeaders('application/xml');
    header('Content-Type: application/xml');
    $server = new XmlRpcServer();
    XmlRpcServer\Fault::attachFaultException('Services\\Exception');
    if (!DEBUG && !XmlRpcServer\Cache::get(XMLRPC_CACHE, $server)) {
        if ($use_pingback) {
            $server->setClass('PukiWiki\\Service\\PingBack', 'pingback');
        }
        $server->setClass('PukiWiki\\Service\\WikiRpc', 'wiki');
        XmlRpcServer\Cache::save(XMLRPC_CACHE, $server);
    }
    //Header::writeResponse($headers, 200, $server->handle());
    echo $server->handle();
    exit;
}