Skip to content

Commit

Permalink
tagHtml added more tests
Browse files Browse the repository at this point in the history
	modified:   php-tests/tests/Phalcon/Tag/UnitTest.php
  • Loading branch information
Nikolaos Dimopoulos committed Apr 11, 2013
1 parent cec4ae9 commit bfa6acb
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions php-tests/tests/Phalcon/Tag/UnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4852,4 +4852,62 @@ public function testTagHtmlName()
);
}

/**
* Tests the tagHtml with name parameter and self close
*
* @author Nikos Dimopoulos <[email protected]>
* @since 2013-04-04
*/
public function testTagHtmlNameSelfClose()
{
$name = 'img';
$expected = '<img />';
$actual = PhTag::tagHtml($name, null, true);

$this->assertEquals(
$expected,
$actual,
sprintf($this->message, 'tagHtml bare')
);
}
//&tag_parameters, &tag_self_close, &tag_only_start, &tag_eol) == FAILURE) {

/**
* Tests the tagHtml with name parameter and only start
*
* @author Nikos Dimopoulos <[email protected]>
* @since 2013-04-04
*/
public function testTagHtmlNameOnlyStart()
{
$name = 'aside';
$expected = '<aside>';
$actual = PhTag::tagHtml($name, null, null, true);

$this->assertEquals(
$expected,
$actual,
sprintf($this->message, 'tagHtml bare')
);
}

/**
* Tests the tagHtml with name parameter
*
* @author Nikos Dimopoulos <[email protected]>
* @since 2013-04-04
*/
public function testTagHtmlNameEol()
{
$name = 'aside';
$expected = '<aside></aside>' . PHP_EOL;
$actual = PhTag::tagHtml($name, null, null, null, true);

$this->assertEquals(
$expected,
$actual,
sprintf($this->message, 'tagHtml bare')
);
}

}

0 comments on commit bfa6acb

Please sign in to comment.