HtmlBuilder classes for Object, Array, String Replace build
Object build is a replicata from the JS one Array is similar but build on pure Array elements String replace is just a simple string replacer for now General\Error for overall error handling General\Settings for Object/Array based checks and settings
This commit is contained in:
27
4dev/tests/Template/CoreLibsTemplateHtmlBuilderBlockTest.php
Normal file
27
4dev/tests/Template/CoreLibsTemplateHtmlBuilderBlockTest.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace tests;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use CoreLibs\Template\HtmlBuilder\Block;
|
||||
|
||||
/**
|
||||
* Test class for Template\HtmlBuilder\Block
|
||||
* @coversDefaultClass \CoreLibs\Template\HtmlBuilder\Block
|
||||
* @testdox \CoreLibs\Template\HtmlBuilder\Block method tests
|
||||
*/
|
||||
final class CoreLibsTemplateHtmlBuilderBlockTest extends TestCase
|
||||
{
|
||||
public function testCreateBlock(): void
|
||||
{
|
||||
$el = Block::cel('div', 'id', 'content', ['css'], ['onclick' => 'foo();']);
|
||||
$this->assertEquals(
|
||||
'<div id="id" class="css" onclick="foo();">content</div>',
|
||||
Block::buildHtml($el)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// __END__
|
||||
Reference in New Issue
Block a user