mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2024-09-19 19:22:14 +02:00
add tests for User stuff
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@584 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
parent
302914abc0
commit
8d44769372
38
tests/RemoteUserTest.php
Normal file
38
tests/RemoteUserTest.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?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());
|
||||
}
|
||||
}
|
||||
}
|
@ -11,5 +11,6 @@ require_once('simpletest/unit_tester.php');
|
||||
$test = new GroupTest('Postfixadmin XMLRPC Unit Tests');
|
||||
|
||||
$test->addTestFile('./RemoteVacationTest.php');
|
||||
$test->addTestFile('./RemoteUserTest.php');
|
||||
|
||||
exit($test->run(new TextReporter()) ? 0 : 1);
|
||||
|
Loading…
Reference in New Issue
Block a user