From 8d447693728b695b1ed9d31b2068dc890fa173d0 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Mon, 16 Mar 2009 19:49:19 +0000 Subject: [PATCH] add tests for User stuff git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@584 a1433add-5e2c-0410-b055-b7f2511e0802 --- tests/RemoteUserTest.php | 38 ++++++++++++++++++++++++++++++++++++++ tests/run.php | 1 + 2 files changed, 39 insertions(+) create mode 100644 tests/RemoteUserTest.php diff --git a/tests/RemoteUserTest.php b/tests/RemoteUserTest.php new file mode 100644 index 00000000..3449b218 --- /dev/null +++ b/tests/RemoteUserTest.php @@ -0,0 +1,38 @@ +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()); + } + } +} diff --git a/tests/run.php b/tests/run.php index 08ef1963..f122838b 100644 --- a/tests/run.php +++ b/tests/run.php @@ -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);