Passed
Push — master ( 856a7c...bf8406 )
by Jason
02:04
created

ProductFileCollectionTest::testGetCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Dynamic\Products\Test\Page;
4
5
use Dynamic\Products\Page\ProductFileCollection;
6
use SilverStripe\Dev\SapphireTest;
7
use SilverStripe\Forms\FieldList;
8
9
class ProductFileCollectionTest extends SapphireTest
10
{
11
    /**
12
     * @var string
13
     */
14
    protected static $fixture_file = '../fixtures.yml';
15
16
    /**
17
     *
18
     */
19
    public function testGetCMSFields()
20
    {
21
        $object = singleton(ProductFileCollection::class);
22
        $fields = $object->getCMSFields();
23
        $this->assertInstanceOf(FieldList::class, $fields);
24
        $this->assertNotNull($fields->dataFieldByName('ManagedClass'));
25
    }
26
}
27