1 | <?php |
||
16 | class IdentityTest extends \PHPUnit_Framework_TestCase |
||
17 | { |
||
18 | |||
19 | public function getRequest() |
||
39 | |||
40 | public function getBouncer($request) |
||
41 | { |
||
42 | $bouncer = new Bouncer(array( |
||
43 | 'request' => $request, |
||
44 | 'profile' => new \Bouncer\Profile\TestProfile, |
||
45 | )); |
||
46 | |||
47 | return $bouncer; |
||
48 | } |
||
49 | |||
50 | public function testGetIdentity() |
||
60 | |||
61 | public function testGetIdentityAddress() |
||
62 | { |
||
63 | $request = $this->getRequest(); |
||
64 | |||
65 | $bouncer = $this->getBouncer($request); |
||
66 | |||
67 | $identity = $bouncer->getIdentity(); |
||
68 | |||
69 | $address = $identity->getAddress(); |
||
70 | |||
71 | $this->assertEquals('e90d9f20cce9c203f439129b0943a8bb', $address->getId()); |
||
72 | } |
||
73 | |||
74 | |||
75 | public function testGetIdentitySignature() |
||
76 | { |
||
77 | $request = $this->getRequest(); |
||
78 | |||
79 | $bouncer = $this->getBouncer($request); |
||
80 | |||
81 | $identity = $bouncer->getIdentity(); |
||
82 | |||
83 | $signature = $identity->getSignature(); |
||
84 | |||
85 | $this->assertEquals('5a8433a81c1290cc5399eb60f26172d4', $signature->getId()); |
||
86 | } |
||
87 | |||
88 | public function testIdentityStatus() |
||
99 | |||
100 | } |
||
101 |