| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function restoration() |
||
| 31 | { |
||
| 32 | $callbackStub = function () { |
||
| 33 | }; |
||
| 34 | |||
| 35 | $this->assertTrue(spl_autoload_register($callbackStub)); |
||
| 36 | |||
| 37 | $restorer = new AutoloadRestorer(); |
||
| 38 | |||
| 39 | $this->assertTrue(in_array($callbackStub, spl_autoload_functions(), true)); |
||
| 40 | |||
| 41 | $this->assertTrue(spl_autoload_unregister($callbackStub)); |
||
| 42 | |||
| 43 | $this->assertFalse(in_array($callbackStub, spl_autoload_functions(), true)); |
||
| 44 | |||
| 45 | $restorer->restore(); |
||
| 46 | |||
| 47 | $this->assertTrue(in_array($callbackStub, spl_autoload_functions(), true)); |
||
| 48 | } |
||
| 49 | } |
||
| 50 |