summaryrefslogtreecommitdiff
path: root/tests/unit/Web
diff options
context:
space:
mode:
authorknut <>2006-02-02 22:40:22 +0000
committerknut <>2006-02-02 22:40:22 +0000
commit926465223486b1c705b8414a203c0a72abef760f (patch)
treebab60e142a4733798c5e770af6418c65f09ba3af /tests/unit/Web
parent19519f250ef08d19f0ef923552e177dd0f1c2474 (diff)
ported two more unit tests
Diffstat (limited to 'tests/unit/Web')
-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