html-object-strings/tests/Nodes/TextTest.php
2024-07-11 20:01:03 -06:00

23 lines
556 B
PHP

<?php
namespace Joby\HTML\Nodes;
use PHPUnit\Framework\TestCase;
class TextTest extends TestCase
{
public function testSimpleText(): void
{
$this->assertEquals('', new Text(''));
$this->assertEquals('foo', new Text('foo'));
$this->assertEquals('foo', new Text('<strong>foo</strong>'));
}
public function testModification(): void
{
$text = new Text('foo');
$this->assertEquals('foo', $text->value());
$text->setValue('bar');
$this->assertEquals('bar', $text->value());
}
}