| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class U2fRegistrationSuccessEventTest extends TestCase |
||
| 20 | { |
||
| 21 | private $event; |
||
| 22 | private $user; |
||
| 23 | private $key; |
||
| 24 | |||
| 25 | public function setUp() |
||
| 26 | { |
||
| 27 | $this->user = $this->getMockForAbstractClass(U2fUser::class); |
||
| 28 | $this->key = $this->getMockForAbstractClass(U2fKey::class); |
||
| 29 | |||
| 30 | $this->event = new U2fRegistrationSuccessEvent($this->user, $this->key); |
||
| 31 | } |
||
| 32 | |||
| 33 | public function testName() |
||
| 34 | { |
||
| 35 | $name = 'u2f.registration.success'; |
||
| 36 | |||
| 37 | $this->assertEquals(U2fRegistrationSuccessEvent::getName(), $name); |
||
| 38 | $this->assertEquals($this->event->getName(), $name); |
||
| 39 | } |
||
| 40 | |||
| 41 | public function testUser() |
||
| 42 | { |
||
| 43 | $this->assertEquals($this->event->getUser(), $this->user); |
||
| 44 | } |
||
| 45 | |||
| 46 | public function testKey() |
||
| 47 | { |
||
| 48 | $this->assertEquals($this->event->getKey(), $this->key); |
||
| 49 | } |
||
| 51 |