Passed
Pull Request — master (#33)
by Jason
04:14
created

ProductFileCollectionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 1
b 0
f 0
dl 0
loc 16
rs 10
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