lithium\test\Mocker::register PHP Method

register() public static method

Will register this class into the autoloader.
public static register ( ) : void
return void
    public static function register()
    {
        spl_autoload_register(array(__CLASS__, 'create'));
    }

Usage Example

Ejemplo n.º 1
0
 public function setUp()
 {
     Mocker::register();
     $this->_backup['cwd'] = getcwd();
     $this->_backup['_SERVER'] = $_SERVER;
     $_SERVER['argv'] = array();
     chdir($this->_testPath);
     Libraries::add('library_test', array('path' => $this->_testPath . '/library_test', 'bootstrap' => false));
     Libraries::add('library_test_plugin', array('path' => $this->_testPath . '/library_test_plugin'));
     $this->classes = array('service' => 'lithium\\tests\\mocks\\console\\command\\MockLibraryService', 'response' => 'lithium\\tests\\mocks\\console\\MockResponse');
     $this->request = new Request(array('input' => fopen('php://temp', 'w+')));
     $this->library = new Library(array('request' => $this->request, 'classes' => $this->classes));
     $this->testConf = $this->library->conf = $this->_testPath . '/library.json';
 }
All Usage Examples Of lithium\test\Mocker::register