diff options
Diffstat (limited to 'tests/unit/Web/UI/WebControls')
-rw-r--r-- | tests/unit/Web/UI/WebControls/TLabelTest.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/unit/Web/UI/WebControls/TLabelTest.php b/tests/unit/Web/UI/WebControls/TLabelTest.php new file mode 100644 index 00000000..5518a4d8 --- /dev/null +++ b/tests/unit/Web/UI/WebControls/TLabelTest.php @@ -0,0 +1,27 @@ +<?php +require_once dirname(__FILE__).'/../../../phpunit2.php'; + +Prado::using('System.Web.UI.WebControls.TLabel'); +Prado::using('System.Web.UI.THtmlWriter'); + +/** + * @package System.Web.UI.WebControls + */ +class TLabelTest extends PHPUnit2_Framework_TestCase { + + public function testGetTagName() { + $label = new TLabel(); + $this->assertEquals('span', $label->getTagName()); + + $label->setForControl('Test'); + $this->assertEquals('label', $label->getTagName()); + } + + public function testSetText() { + $label = new TLabel(); + $label->setText('Test'); + $this->assertEquals('Test', $label->getText()); + } +} + +?>
\ No newline at end of file |