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

DisabledTransformationTest::testTransform()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
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