File: RemoteUserTest.php

package info (click to toggle)
postfixadmin 2.3.5-2%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,200 kB
  • sloc: php: 25,767; xml: 14,485; perl: 964; sh: 664; python: 169; makefile: 84
file content (40 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
/**
 * Test for Postfixadmin - remote vacation stuff
 *
 * @package tests
 */

require_once('RemoteTest.php');

class RemoteUserTest extends RemoteTest {
    
    public function __construct() {
        parent::__construct();
        global $CONF;
    }


    /**
     * Adds the test recipient data to the database.
     */
    public function setUp() {
        parent::setUp();
    }
    public function tearDown() {
        parent::tearDown();
    }

    public function testChangePassword() {
        try {
            $this->assertTrue($this->user->login($this->username, $this->password));
            $this->assertTrue($this->user->changePassword($this->password, 'foobar'));
            $this->assertTrue($this->user->login($this->username, 'foobar'));
        }
        catch(Exception $e) {
            var_dump($this->xmlrpc_client->getHttpClient()->getLastResponse()->getBody());
        }
    }
}

/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */