silverstripe-framework/tests/php/ORM/LabelFieldTest.php
2016-12-19 16:08:19 +13:00

17 lines
383 B
PHP

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