UserTest::testEraseCredentials()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
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 testGetRoles()
39
	{
40
		$this->assertEquals( array( 'ROLE_USER' ), $this->object->getRoles() );
41
	}
42
43
44
	public function testEraseCredentials()
45
	{
46
		$this->object->eraseCredentials();
47
		$this->assertNull( $this->object->getPassword() );
48
	}
49
}
50