mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-06 09:41:36 +02:00
21 lines
532 B
PHP
21 lines
532 B
PHP
|
<?php
|
||
|
|
||
|
namespace SilverStripe\Forms\Tests;
|
||
|
|
||
|
use SilverStripe\Dev\SapphireTest;
|
||
|
use SilverStripe\Forms\DisabledTransformation;
|
||
|
use SilverStripe\Forms\TextField;
|
||
|
|
||
|
class DisabledTransformationTest extends SapphireTest
|
||
|
{
|
||
|
public function testTransform()
|
||
|
{
|
||
|
$field = new TextField('Test');
|
||
|
|
||
|
$transformation = new DisabledTransformation();
|
||
|
$newField = $transformation->transform($field);
|
||
|
|
||
|
$this->assertTrue($newField->isDisabled(), 'Transformation failed to transform field to be disabled');
|
||
|
}
|
||
|
}
|