silverstripe-framework/tests/model/LabelFieldTest.php
Damian Mooyman 8dd644d25d
API Namespace all classes
Namespace all templates
Move difflib and BBCodeParser2 to thirdparty
Remove deprecated API marked for removal in 4.0
2016-09-08 10:23:17 +12:00

18 lines
378 B
PHP

<?php
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\LabelField;
/**
* @package framework
* @subpackage tests
*/
class LabelFieldTest extends SapphireTest {
public function testFieldHasNoNameAttribute() {
$field = new LabelField('MyName', 'MyTitle');
$this->assertEquals(trim($field->Field()), '<label id="MyName" class="readonly">MyTitle</label>');
}
}