2023-01-09 09:05:24 +00:00
|
|
|
<?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();
|
2023-03-07 10:09:32 +00:00
|
|
|
$navLayout = $antCMS->getThemeTemplate('nav');
|
2023-01-09 09:05:24 +00:00
|
|
|
|
|
|
|
$result = AntPages::generateNavigation($navLayout, $pageTemplate);
|
|
|
|
|
|
|
|
$this->assertNotEmpty($result);
|
|
|
|
$this->assertIsString($result);
|
|
|
|
}
|
|
|
|
}
|