Fix bug #3111254: getIdFromUser() always returns an integer now (part 2)
This commit is contained in:
parent
df00540d4c
commit
814f99d471
3 changed files with 18 additions and 1 deletions
|
@ -19,6 +19,7 @@ ChangeLog for SemantiScuttle
|
|||
- Fix bug #3413459: Thumbnails not in one line
|
||||
- Fix bug #3468293: Delicious import does not preserve private links
|
||||
- Fix bug #3396727: Title of http://lesscss.org/ not loaded
|
||||
- Fix bug #3111254: getIdFromUser() always returns an integer now (part 2)
|
||||
- Implement request #3403609: fr_CA translation update
|
||||
- Implement patch #3476011: PostgreSQL tables can not be initialized
|
||||
(Frédéric Fauberteau [triaxx])
|
||||
|
|
|
@ -56,7 +56,7 @@ class SemanticScuttle_Model_User
|
|||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
return (int)$this->id;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -246,6 +246,22 @@ class UserTest extends TestBase
|
|||
);
|
||||
}
|
||||
|
||||
public function testGetIdFromUserParamId()
|
||||
{
|
||||
$uid = $this->addUser();
|
||||
$newId = $this->us->getIdFromUser($uid);
|
||||
$this->assertInternalType('integer', $newId);
|
||||
$this->assertEquals($uid, $newId);
|
||||
}
|
||||
|
||||
public function testGetIdFromUserParamUsername()
|
||||
{
|
||||
$uid = $this->addUser('someusername');
|
||||
$newId = $this->us->getIdFromUser('someusername');
|
||||
$this->assertInternalType('integer', $newId);
|
||||
$this->assertEquals($uid, $newId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue