Passed
Push — nested-vendor ( f8843a )
by Sam
09:43
created

DisabledTransformationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testTransform() 0 8 1
1
<?php
2
3
namespace SilverStripe\Forms\Tests;
4
5
use SilverStripe\Dev\SapphireTest;
6
use SilverStripe\Forms\DisabledTransformation;
7
use SilverStripe\Forms\TextField;
8
9
class DisabledTransformationTest extends SapphireTest
10
{
11
    public function testTransform()
12
    {
13
        $field = new TextField('Test');
14
15
        $transformation = new DisabledTransformation();
16
        $newField = $transformation->transform($field);
17
18
        $this->assertTrue($newField->isDisabled(), 'Transformation failed to transform field to be disabled');
19
    }
20
}
21