summaryrefslogtreecommitdiff
path: root/tests/unit/Web/UI/WebControls/TLabelTest.php
blob: 5518a4d844234f944e2c6bad3b3f058d4a3dd373 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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());
  }
}

?>