feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
46
modules/cms/tests/classes/CmsExceptionTest.php
Normal file
46
modules/cms/tests/classes/CmsExceptionTest.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Cms\Tests\Classes;
|
||||
|
||||
use System\Tests\Bootstrap\TestCase;
|
||||
use Cms\Classes\CmsException;
|
||||
use Cms\Classes\Router;
|
||||
use Cms\Classes\Theme;
|
||||
use Winter\Storm\Exception\SystemException;
|
||||
|
||||
class CmsExceptionTest extends TestCase
|
||||
{
|
||||
//
|
||||
// Tests
|
||||
//
|
||||
|
||||
public function testExceptionMask()
|
||||
{
|
||||
$foreignException = new \Exception('This is a general error');
|
||||
$exceptionMask = new SystemException('This is a system exception');
|
||||
$exceptionMask->setMask($foreignException);
|
||||
|
||||
$this->assertEquals('This is a general error', $exceptionMask->getMessage());
|
||||
}
|
||||
|
||||
public function testCmsExceptionPhp()
|
||||
{
|
||||
$theme = Theme::load('test');
|
||||
$router = new Router($theme);
|
||||
$page = $router->findByUrl('/throw-php');
|
||||
|
||||
$error = [
|
||||
'file' => 'test.php',
|
||||
'line' => 20,
|
||||
];
|
||||
$foreignException = new \Symfony\Component\ErrorHandler\Error\FatalError('This is a general error', 100, $error);
|
||||
$this->setProtectedProperty($foreignException, 'file', "/modules/cms/classes/CodeParser.php(165) : eval()'d code line 7");
|
||||
|
||||
$exception = new CmsException($page, 300);
|
||||
$exception->setMask($foreignException);
|
||||
|
||||
$this->assertEquals($page->getFilePath(), $exception->getFile());
|
||||
$this->assertEquals('PHP Content', $exception->getErrorType());
|
||||
$this->assertEquals('This is a general error', $exception->getMessage());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user