Skip to content

Commit

Permalink
UnitTests update
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Nov 18, 2024
1 parent 1fa1c9d commit c62b92d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/src/Ease/Html/ATagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ protected function tearDown(): void
{
}

/**
* @covers \Ease\Html\ATag::__construct
*/
public function testConstructor(): void
{
$classname = \get_class($this->object);
Expand Down
9 changes: 8 additions & 1 deletion tests/src/Ease/Html/BodyTagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
*/
class BodyTagTest extends PairTagTest
{
public string $rendered = '<body>
public string $rendered = '<body></body>';
public string $renderedEmpty = '<body></body>';
public string $renderedWithJS = '<body>
<script>
// <![CDATA[
Expand All @@ -35,6 +37,7 @@ class BodyTagTest extends PairTagTest
// ]]>
</script>
</body>';

protected $object;

/**
Expand Down Expand Up @@ -85,6 +88,10 @@ public function testDrawIfNotDrawn($canBeEmpty = false): void
*/
public function testDraw($whatWant = null): void
{
$this->rendered = '<body></body>';
$this->object->emptyContents();
\Ease\WebPage::clearJavaScriptsCache();
\Ease\WebPage::clearCascadeStylesCache();
parent::testDraw($whatWant);
}

Expand Down
1 change: 1 addition & 0 deletions tests/src/Ease/Html/PairTagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected function tearDown(): void
}

/**
* @covers \Ease\Html\PairTag::__construct
* Check Constructor.
*/
public function testConstructor(): void
Expand Down
5 changes: 4 additions & 1 deletion tests/src/Ease/Html/SubmitButtonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ protected function setUp(): void
protected function tearDown(): void
{
}


/**
* @covers \Ease\Html\SubmitButton::__construct
*/
public function testConstructor(): void
{
$classname = \get_class($this->object);
Expand Down

0 comments on commit c62b92d

Please sign in to comment.