function test_ping_update()
    {
        $rmt_mck = new mck_mdl_remotes('sue', 'Big fat human');

        $rmt = new mdl_remotes();
        $_POST['data'] = 
            $rmt->send_ping('http://localhost/',
                'update', 'null', $rmt_mck->get_pub_key(), $rmt_mck->get_priv_key(),
                'http://localhost/messages/follow/fred', true);

        $msg = new ctrl_messages();

    // call ping
        ob_start();
        $msg->ping();
        $result = ob_get_contents();
        ob_end_clean();

        $xml = $rmt->decode_ping_response($result);

        $this->assertTrue($xml->state == 'success');

        $csh = new mdl_message_cache();
        $result = $csh->get_cached_user('http://localhost/messages/follow/fred');

        $this->assertEquals($result[0]['Update_cache'], 1);
    }
    function test_purge_remote()
    {
        $csh = new mdl_message_cache();
        $csh->purge_remote('http://localhost/messages/follow/fred');

        $result = $csh->get_remote('http://localhost/messages/follow/fred');
        $this->assertEquals($result, array());
    }