-
Notifications
You must be signed in to change notification settings - Fork 334
Expand file tree
/
Copy pathUserTest.php
More file actions
66 lines (57 loc) · 1.58 KB
/
Copy pathUserTest.php
File metadata and controls
66 lines (57 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
namespace ZfcUserTest\Entity;
use ZfcUser\Entity\User as Entity;
class UserTest extends \PHPUnit_Framework_TestCase
{
protected $user;
public function setUp()
{
$user = new Entity;
$this->user = $user;
}
/**
* @covers ZfcUser\Entity\User::setId
* @covers ZfcUser\Entity\User::getId
*/
public function testSetGetId()
{
$this->user->setId(1);
$this->assertEquals(1, $this->user->getId());
}
/**
* @covers ZfcUser\Entity\User::setUsername
* @covers ZfcUser\Entity\User::getUsername
*/
public function testSetGetUsername()
{
$this->user->setUsername('zfcUser');
$this->assertEquals('zfcUser', $this->user->getUsername());
}
/**
* @covers ZfcUser\Entity\User::setDisplayName
* @covers ZfcUser\Entity\User::getDisplayName
*/
public function testSetGetDisplayName()
{
$this->user->setDisplayName('Zfc User');
$this->assertEquals('Zfc User', $this->user->getDisplayName());
}
/**
* @covers ZfcUser\Entity\User::setEmail
* @covers ZfcUser\Entity\User::getEmail
*/
public function testSetGetEmail()
{
$this->user->setEmail('zfcUser@zfcUser.com');
$this->assertEquals('zfcUser@zfcUser.com', $this->user->getEmail());
}
/**
* @covers ZfcUser\Entity\User::setPassword
* @covers ZfcUser\Entity\User::getPassword
*/
public function testSetGetPassword()
{
$this->user->setPassword('zfcUser');
$this->assertEquals('zfcUser', $this->user->getPassword());
}
}