| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | public function testNfc() |
||
| 15 | { |
||
| 16 | $nfc = new Nfc('message', 'encryptionPublicKey', true); |
||
| 17 | |||
| 18 | $this->assertEquals('message', $nfc->getMessage()); |
||
| 19 | $this->assertEquals('encryptionPublicKey', $nfc->getEncryptionPublicKey()); |
||
| 20 | $this->assertEquals(true, $nfc->getRequiresAuthentication()); |
||
| 21 | |||
| 22 | $nfc |
||
| 23 | ->setMessage('hello') |
||
| 24 | ->setEncryptionPublicKey('publicKey') |
||
| 25 | ->setRequiresAuthentication(false) |
||
| 26 | ; |
||
| 27 | |||
| 28 | $this->assertEquals('hello', $nfc->getMessage()); |
||
| 29 | $this->assertEquals('publicKey', $nfc->getEncryptionPublicKey()); |
||
| 30 | $this->assertEquals(false, $nfc->getRequiresAuthentication()); |
||
| 31 | |||
| 32 | $array = $nfc->toArray(); |
||
| 33 | $this->assertArrayHasKey('message', $array); |
||
| 34 | $this->assertArrayHasKey('encryptionPublicKey', $array); |
||
| 35 | $this->assertArrayHasKey('requiresAuthentication', $array); |
||
| 36 | } |
||
| 37 | } |