for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* this file is part of magerun
*
* @author Tom Klingenberg <https://github.com/ktomk>
*/
namespace N98\Util;
* Class AutoloadRestorerTest
* @package N98\Util
class AutoloadRestorerTest extends \PHPUnit_Framework_TestCase
{
* @test
public function creation()
$restorer = new AutoloadRestorer();
$this->assertInstanceOf('N98\Util\AutoloadRestorer', $restorer);
}
public function restoration()
$callbackStub = function () {
};
$this->assertTrue(spl_autoload_register($callbackStub));
$this->assertTrue(in_array($callbackStub, spl_autoload_functions(), true));
$this->assertTrue(spl_autoload_unregister($callbackStub));
$this->assertFalse(in_array($callbackStub, spl_autoload_functions(), true));
$restorer->restore();