Passed
Push — programming-is-horrible ( 483908...9ee56e )
by Sam
08:38
created

PrintableTransformationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testTransformTabSet() 0 11 1
1
<?php
2
3
namespace SilverStripe\Forms\Tests;
4
5
use SilverStripe\Dev\SapphireTest;
6
use SilverStripe\Forms\PrintableTransformation;
7
use SilverStripe\Forms\PrintableTransformation_TabSet;
8
use SilverStripe\Forms\Tab;
9
use SilverStripe\Forms\TabSet;
10
11
class PrintableTransformationTest extends SapphireTest
12
{
13
    public function testTransformTabSet()
14
    {
15
        $tab1 = new Tab('Main');
16
        $tab2 = new Tab('Settings');
17
        $tabSet = new TabSet('Root', 'Root', $tab1, $tab2);
18
19
        $transformation = new PrintableTransformation();
20
        $result = $transformation->transformTabSet($tabSet);
21
22
        $this->assertInstanceOf(PrintableTransformation_TabSet::class, $result);
23
        $this->assertSame('Root', $result->Title());
24
    }
25
}
26