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