Conditions | 1 |
Paths | 1 |
Total Lines | 27 |
Code Lines | 21 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public function testPass(): void |
||
13 | { |
||
14 | $data = new Simplified\SessionAdapter(); |
||
15 | $this->assertInstanceOf(\ArrayAccess::class, $data); |
||
16 | |||
17 | $data->foz = 'wuz'; |
||
|
|||
18 | $this->assertTrue(isset($data->foz)); |
||
19 | $this->assertEquals('wuz', $data->foz); |
||
20 | unset($data->foz); |
||
21 | |||
22 | $data['ugg'] = 'huu'; |
||
23 | $this->assertTrue(isset($data['ugg'])); |
||
24 | $this->assertEquals('huu', $data['ugg']); |
||
25 | unset($data['ugg']); |
||
26 | |||
27 | $nullKey = 'bnm' . chr(0) . 'lkj'; |
||
28 | $data[$nullKey] = 'thd'; |
||
29 | $this->assertTrue(isset($data[$nullKey])); |
||
30 | $this->assertTrue(isset($data['bnmlkj'])); |
||
31 | $this->assertEquals('thd', $data[$nullKey]); |
||
32 | $this->assertEquals('thd', $data['bnmlkj']); |
||
33 | unset($data[$nullKey]); |
||
34 | |||
35 | $data->gsr = 'vfr'; |
||
36 | $this->assertNotEmpty(iterator_to_array($data->getIterator())); |
||
37 | unset($data->gsr); |
||
38 | $this->assertEmpty(iterator_to_array($data->getIterator())); |
||
39 | } |
||
52 |