@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | 'customer.address.position' => 1, |
23 | 23 | ); |
24 | 24 | |
25 | - $this->address = new \Aimeos\MShop\Common\Item\Address\Standard( 'common.address.', $addressValues ); |
|
25 | + $this->address = new \Aimeos\MShop\Common\Item\Address\Standard('common.address.', $addressValues); |
|
26 | 26 | |
27 | 27 | $values = array( |
28 | 28 | 'customer.id' => 541, |
@@ -54,71 +54,71 @@ discard block |
||
54 | 54 | 'customer.mtime'=> '2010-01-05 00:00:05', |
55 | 55 | 'customer.ctime'=> '2010-01-01 00:00:00', |
56 | 56 | 'customer.editor' => 'unitTestUser', |
57 | - 'roles' => array( 'ROLE_ADMIN' ), |
|
57 | + 'roles' => array('ROLE_ADMIN'), |
|
58 | 58 | 'salt' => 'test', |
59 | 59 | ); |
60 | 60 | |
61 | - $this->object = new \Aimeos\MShop\Customer\Item\FosUser( $this->address, $values ); |
|
61 | + $this->object = new \Aimeos\MShop\Customer\Item\FosUser($this->address, $values); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | protected function tearDown() |
65 | 65 | { |
66 | - unset( $this->object ); |
|
66 | + unset($this->object); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | public function testGetPassword() |
70 | 70 | { |
71 | - $this->assertEquals( 'testpwd', $this->object->getPassword() ); |
|
71 | + $this->assertEquals('testpwd', $this->object->getPassword()); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | public function testSetPassword() |
75 | 75 | { |
76 | - $this->object->setPassword( 'new' ); |
|
77 | - $this->assertTrue( $this->object->isModified() ); |
|
78 | - $this->assertEquals( 'new', $this->object->getPassword() ); |
|
76 | + $this->object->setPassword('new'); |
|
77 | + $this->assertTrue($this->object->isModified()); |
|
78 | + $this->assertEquals('new', $this->object->getPassword()); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | public function testSetPasswordGenerated() |
82 | 82 | { |
83 | - $helper = new \Aimeos\MShop\Common\Item\Helper\Password\Standard( array( 'format' => '%1$s{%2$s}' ) ); |
|
84 | - $object = new \Aimeos\MShop\Customer\Item\FosUser( $this->address, [], [], [], null, $helper ); |
|
83 | + $helper = new \Aimeos\MShop\Common\Item\Helper\Password\Standard(array('format' => '%1$s{%2$s}')); |
|
84 | + $object = new \Aimeos\MShop\Customer\Item\FosUser($this->address, [], [], [], null, $helper); |
|
85 | 85 | |
86 | - $object->setPassword( 'newpwd' ); |
|
87 | - $this->assertEquals( sha1( 'newpwd{' . $object->getSalt() . '}' ), $object->getPassword() ); |
|
86 | + $object->setPassword('newpwd'); |
|
87 | + $this->assertEquals(sha1('newpwd{' . $object->getSalt() . '}'), $object->getPassword()); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | public function testGetRoles() |
91 | 91 | { |
92 | - $this->assertEquals( array( 'ROLE_ADMIN' ), $this->object->getRoles() ); |
|
92 | + $this->assertEquals(array('ROLE_ADMIN'), $this->object->getRoles()); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | public function testSetRoles() |
96 | 96 | { |
97 | - $this->object->setRoles( array( 'ROLE_USER' ) ); |
|
98 | - $this->assertTrue( $this->object->isModified() ); |
|
99 | - $this->assertEquals( array( 'ROLE_USER' ), $this->object->getRoles() ); |
|
97 | + $this->object->setRoles(array('ROLE_USER')); |
|
98 | + $this->assertTrue($this->object->isModified()); |
|
99 | + $this->assertEquals(array('ROLE_USER'), $this->object->getRoles()); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | public function testGetSalt() |
103 | 103 | { |
104 | - $this->assertEquals( 'test', $this->object->getSalt() ); |
|
104 | + $this->assertEquals('test', $this->object->getSalt()); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | public function testGetSaltGenerated() |
108 | 108 | { |
109 | - $object = new \Aimeos\MShop\Customer\Item\FosUser( $this->address, [] ); |
|
110 | - $this->assertEquals( '', $object->getSalt() ); |
|
109 | + $object = new \Aimeos\MShop\Customer\Item\FosUser($this->address, []); |
|
110 | + $this->assertEquals('', $object->getSalt()); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | public function testSetSalt() |
114 | 114 | { |
115 | - $this->object->setSalt( 'new' ); |
|
116 | - $this->assertTrue( $this->object->isModified() ); |
|
117 | - $this->assertEquals( 'new', $this->object->getSalt() ); |
|
115 | + $this->object->setSalt('new'); |
|
116 | + $this->assertTrue($this->object->isModified()); |
|
117 | + $this->assertEquals('new', $this->object->getSalt()); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | public function testIsModified() |
121 | 121 | { |
122 | - $this->assertFalse( $this->object->isModified() ); |
|
122 | + $this->assertFalse($this->object->isModified()); |
|
123 | 123 | } |
124 | 124 | } |