23e8b18ba3
* Implemented rudimentary multi-user support * Delete src.zip * Improve the update user function And added a new function to the auth module to invalidate a session * Update AntAuth.php * Rename the configs, a bit more auth stuff * Fix test and JS regex * Turn the admin landing page into a twig template * plugin/admin/ -> admin/ * Refactored templating for plugins Plus. I finally converted the remaining options in the admin plugin to twig templates. No extra styling, but it'll be easier now * Fix PHPStan warnings * Basic "first time" user setup * Improved styling * Started implementing user management * Completed user management in the admin panel * Renamed templates, added support for sub-dirs * Limit and validate allowed chars for usernames * Finished the basics of the profile plugin * Styling for the bootstrap theme * Some more final touches * Added an example to show author * Tweak to the readme
30 lines
740 B
PHP
30 lines
740 B
PHP
<?php
|
|
|
|
use AntCMS\AntPages;
|
|
use AntCMS\AntCMS;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
include_once 'Includes' . DIRECTORY_SEPARATOR . 'Include.php';
|
|
|
|
class PagesTest extends TestCase
|
|
{
|
|
public function testGetGenerateAndGetPages()
|
|
{
|
|
AntPages::generatePages();
|
|
$result = AntPages::getPages();
|
|
|
|
$this->assertNotEmpty($result);
|
|
$this->assertIsArray($result);
|
|
}
|
|
|
|
public function testGetNavigation(){
|
|
$antCMS = new AntCMS;
|
|
$pageTemplate = $antCMS->getThemeTemplate();
|
|
$navLayout = $antCMS->getThemeTemplate('nav');
|
|
|
|
$result = AntPages::generateNavigation($navLayout, $pageTemplate);
|
|
|
|
$this->assertNotEmpty($result);
|
|
$this->assertIsString($result);
|
|
}
|
|
}
|