summaryrefslogtreecommitdiff
path: root/tests/TestBase.php
diff options
context:
space:
mode:
authorMark Pemberton <mpemberton5@gmail.com>2011-05-13 14:26:51 -0400
committerMark Pemberton <mpemberton5@gmail.com>2011-05-13 14:26:51 -0400
commitec345f7a1343769abdf3f5920a0732b24726b733 (patch)
tree1a65f2f0bea89b16f5c8e93264b67e2927570677 /tests/TestBase.php
parent803b83fb7d051593066b5224a59fbf3ec6efc824 (diff)
downloadsemanticscuttle-ec345f7a1343769abdf3f5920a0732b24726b733.tar.gz
semanticscuttle-ec345f7a1343769abdf3f5920a0732b24726b733.tar.bz2
new privatekey2 branch with privatekey changes
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
+?>