split up privateKeyExists tests into several methods and test empty string values
This commit is contained in:
parent
20f4404e4c
commit
eb47149a40
@ -387,15 +387,29 @@ class UserTest extends TestBase
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if privateKeyExists() returns right
|
* @covers SemanticScuttle_Service_User::privateKeyExists
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function testTestUniquePrivateId()
|
public function testPrivateKeyExistsEmpty()
|
||||||
|
{
|
||||||
|
$this->assertFalse($this->us->privateKeyExists(null));
|
||||||
|
$this->assertFalse($this->us->privateKeyExists(''));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers SemanticScuttle_Service_User::privateKeyExists
|
||||||
|
*/
|
||||||
|
public function testPrivateKeyExistsInvalid()
|
||||||
{
|
{
|
||||||
$this->assertFalse($this->us->privateKeyExists('-1'));
|
$this->assertFalse($this->us->privateKeyExists('-1'));
|
||||||
$randKey = $this->us->getNewPrivateKey();
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers SemanticScuttle_Service_User::privateKeyExists
|
||||||
|
*/
|
||||||
|
public function testPrivateKeyExists()
|
||||||
|
{
|
||||||
|
|
||||||
|
$randKey = $this->us->getNewPrivateKey();
|
||||||
$this->assertFalse($this->us->privateKeyExists($randKey));
|
$this->assertFalse($this->us->privateKeyExists($randKey));
|
||||||
$uid = $this->addUser(null, null, $randKey);
|
$uid = $this->addUser(null, null, $randKey);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user