Passed
Pull Request — master (#26)
by Jason
02:06
created

ProductOptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetCMSFields() 0 5 1
1
<?php
2
3
namespace Dynamic\Foxy\Test\Model;
4
5
use Dynamic\Foxy\Model\OptionType;
6
use Dynamic\Foxy\Model\ProductOption;
7
use SilverStripe\Core\Injector\Injector;
8
use SilverStripe\Dev\SapphireTest;
9
use SilverStripe\Forms\FieldList;
10
11
class ProductOptionTest extends SapphireTest
12
{
13
    /**
14
     * @var string
15
     */
16
    protected static $fixture_file = '../fixtures.yml';
17
18
    /**
19
     *
20
     */
21
    public function testGetCMSFields()
22
    {
23
        $object = $this->objFromFixture(ProductOption::class, 'small');
24
        $fields = $object->getCMSFields();
25
        $this->assertInstanceOf(FieldList::class, $fields);
26
    }
27
}
28