aboutsummaryrefslogtreecommitdiff
path: root/tests/TestBase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/TestBase.php')
-rw-r--r--tests/TestBase.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/TestBase.php b/tests/TestBase.php
index 095f32d..1331ec6 100644
--- a/tests/TestBase.php
+++ b/tests/TestBase.php
@@ -78,14 +78,15 @@ class TestBase extends PHPUnit_Framework_TestCase
*
* @param string $username Username
* @param string $password Password
+ * @param string $pkey Private Key
*
* @return integer ID of user
*
* @uses addUserData()
*/
- protected function addUser($username = null, $password = null)
+ protected function addUser($username = null, $password = null, $pkey = null)
{
- return reset($this->addUserData($username, $password));
+ return reset($this->addUserData($username, $password, $pkey));
}
@@ -95,10 +96,11 @@ class TestBase extends PHPUnit_Framework_TestCase
*
* @param string $username Username
* @param string $password Password
+ * @param string $pkey Private Key
*
* @return array ID of user, Name of user, password of user
*/
- protected function addUserData($username = null, $password = null)
+ protected function addUserData($username = null, $password = null, $pkey = null)
{
$us = SemanticScuttle_Service_Factory::get('User');
$rand = rand();
@@ -113,7 +115,8 @@ class TestBase extends PHPUnit_Framework_TestCase
$uid = $us->addUser(
$username,
$password,
- 'unittest-' . $rand . '@example.org'
+ 'unittest-' . $rand . '@example.org',
+ $pkey
);
return array($uid, $username, $password);
}
@@ -148,4 +151,4 @@ class TestBase extends PHPUnit_Framework_TestCase
}
}
-?> \ No newline at end of file
+?>