mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +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');
|
||
|
}
|
||
|
}
|