Passed
Push — master ( cdbf03...0df18a )
by Aimeos
04:18
created

UserTest::testGetUserIdentifier()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Aimeos\ShopBundle\Tests\Entity;
4
5
6
use Aimeos\ShopBundle\Entity\User;
7
8
9
class UserTest extends \PHPUnit\Framework\TestCase
10
{
11
	private $object;
12
13
14
	protected function setUp() : void
15
	{
16
		$this->object = new User();
17
	}
18
19
20
	public function testGetId()
21
	{
22
		$this->assertEquals( null, $this->object->getId() );
23
	}
24
25
26
	public function testGetUserIdentifier()
27
	{
28
		$this->assertEquals( null, $this->object->getUserIdentifier() );
29
	}
30
31
32
	public function testGetPassword()
33
	{
34
		$this->assertEquals( null, $this->object->getPassword() );
35
	}
36
37
38
	public function testGetSalt()
39
	{
40
		$this->assertEquals( 'mshop', $this->object->getSalt() );
41
	}
42
43
44
	public function testGetRoles()
45
	{
46
		$this->assertEquals( array( 'ROLE_USER' ), $this->object->getRoles() );
47
	}
48
49
50
	public function testEraseCredentials()
51
	{
52
		$this->object->eraseCredentials();
53
		$this->assertNull( $this->object->getPassword() );
54
	}
55
}
56