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