summaryrefslogtreecommitdiff
path: root/tests/unit/Web/UI/WebControls/TLabelTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/Web/UI/WebControls/TLabelTest.php')
-rw-r--r--tests/unit/Web/UI/WebControls/TLabelTest.php27
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