silverstripe-framework/tests/php/ORM/LabelFieldTest.php

17 lines
389 B
PHP
Raw Normal View History

<?php
2016-10-14 03:30:05 +02:00
namespace SilverStripe\ORM\Tests;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Forms\LabelField;
class LabelFieldTest extends SapphireTest
{
public function testFieldHasNoNameAttribute()
{
$field = new LabelField('MyName', 'MyTitle');
2022-04-14 03:12:59 +02:00
$this->assertEquals(trim($field->Field() ?? ''), '<label id="MyName" class="readonly">MyTitle</label>');
}
}