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
39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace Cms\Tests\Classes;
|
|
|
|
use System\Tests\Bootstrap\TestCase;
|
|
use Cms\Classes\Content;
|
|
use Cms\Classes\Theme;
|
|
|
|
class ContentTest extends TestCase
|
|
{
|
|
|
|
public function testMarkdownContent()
|
|
{
|
|
$theme = Theme::load('test');
|
|
$content = Content::load($theme, 'markdown-content.md');
|
|
|
|
$this->assertEquals('Be brave, be **bold**, live *italic*', $content->markup);
|
|
$this->assertEquals("<p>Be brave, be <strong>bold</strong>, live <em>italic</em></p>\n", $content->parsedMarkup);
|
|
}
|
|
|
|
public function testTextContent()
|
|
{
|
|
$theme = Theme::load('test');
|
|
$content = Content::load($theme, 'text-content.txt');
|
|
|
|
$this->assertEquals('Pen is <mightier> than the sword, HTML is <richer> than the text', $content->markup);
|
|
$this->assertEquals('Pen is <mightier> than the sword, HTML is <richer> than the text', $content->parsedMarkup);
|
|
}
|
|
|
|
public function testHtmlContent()
|
|
{
|
|
$theme = Theme::load('test');
|
|
$content = Content::load($theme, 'html-content.htm');
|
|
|
|
$this->assertEquals('<a href="#">Stephen Saucier</a> changed his profile picture — <small>7 hrs ago</small></div>', $content->markup);
|
|
$this->assertEquals('<a href="#">Stephen Saucier</a> changed his profile picture — <small>7 hrs ago</small></div>', $content->parsedMarkup);
|
|
}
|
|
}
|