2010-04-12 05:31:02 +02:00
|
|
|
<?php
|
2016-08-19 00:51:35 +02:00
|
|
|
|
2016-10-14 03:30:05 +02:00
|
|
|
namespace SilverStripe\ORM\Tests;
|
|
|
|
|
2016-08-19 00:51:35 +02:00
|
|
|
use SilverStripe\Dev\SapphireTest;
|
|
|
|
use SilverStripe\Forms\LabelField;
|
|
|
|
|
2010-04-12 05:31:02 +02:00
|
|
|
class LabelFieldTest extends SapphireTest {
|
|
|
|
|
2012-09-19 12:07:39 +02:00
|
|
|
public function testFieldHasNoNameAttribute() {
|
2010-04-12 05:31:02 +02:00
|
|
|
$field = new LabelField('MyName', 'MyTitle');
|
2015-08-30 07:02:55 +02:00
|
|
|
$this->assertEquals(trim($field->Field()), '<label id="MyName" class="readonly">MyTitle</label>');
|
2010-04-12 05:31:02 +02:00
|
|
|
}
|
|
|
|
}
|