silverstripe-framework/tests/php/ORM/LabelFieldTest.php
Guy Sartorelli cd8090d247
API Refactor template layer into its own module
Includes the following large-scale changes:
- Impoved barrier between model and view layers
- Improved casting of scalar to relevant DBField types
- Improved capabilities for rendering arbitrary data in templates
2024-10-14 14:52:36 +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('<label id="MyName" class="readonly">MyTitle</label>', trim($field->Field()));
}
}