-
Notifications
You must be signed in to change notification settings - Fork 334
Expand file tree
/
Copy pathChangePasswordTest.php
More file actions
38 lines (30 loc) · 1.13 KB
/
ChangePasswordTest.php
File metadata and controls
38 lines (30 loc) · 1.13 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
<?php
namespace ZfcUserTest\Form;
use ZfcUser\Form\ChangePassword as Form;
class ChangePasswordTest extends \PHPUnit_Framework_TestCase
{
/**
* @covers ZfcUser\Form\ChangePassword::__construct
*/
public function testConstruct()
{
$options = $this->getMock('ZfcUser\Options\AuthenticationOptionsInterface');
$form = new Form(null, $options);
$elements = $form->getElements();
$this->assertArrayHasKey('identity', $elements);
$this->assertArrayHasKey('credential', $elements);
$this->assertArrayHasKey('newCredential', $elements);
$this->assertArrayHasKey('newCredentialVerify', $elements);
$this->assertArrayHasKey('security', $elements);
}
/**
* @covers ZfcUser\Form\ChangePassword::getAuthenticationOptions
* @covers ZfcUser\Form\ChangePassword::setAuthenticationOptions
*/
public function testSetGetAuthenticationOptions()
{
$options = $this->getMock('ZfcUser\Options\AuthenticationOptionsInterface');
$form = new Form(null, $options);
$this->assertSame($options, $form->getAuthenticationOptions());
}
}