AntCMS/tests/Includes/Include.php
Belle Aerni ebb0fce492
Bump AntLoader to version 2 (#46)
* Bump AntLoader to version 2

* Whoops - I forgot about the tests

* Oh yeah, cron.

Note to self: turn the autoloader into an individual file that can be included by the tests / cron file so I don't need to update 3 of them manually
2023-05-27 02:14:33 -07:00

11 lines
436 B
PHP

<?php
$basedir = dirname(__DIR__, 2);
$srcdir = $basedir . DIRECTORY_SEPARATOR . 'src';
include_once $srcdir . DIRECTORY_SEPARATOR . 'Constants.php';
$classMapPath = $srcdir . DIRECTORY_SEPARATOR . 'Cache' . DIRECTORY_SEPARATOR . 'classMap.php';
$loader = new AntCMS\AntLoader(['path' => $classMapPath]);
$loader->addNamespace('AntCMS\\', $srcdir . DIRECTORY_SEPARATOR . 'AntCMS');
$loader->checkClassMap();
$loader->register();