Passed
Pull Request — master (#6)
by Jason
03:27 queued 01:47
created

ProductExpirationManagerTest::testGetCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Dynamic\Foxy\Inventory\Test\Extension;
4
5
use Dynamic\Foxy\Inventory\Test\TestOnly\Page\TestProduct;
6
use SilverStripe\Dev\SapphireTest;
7
use SilverStripe\Forms\FieldList;
8
9
class ProductExpirationManagerTest extends SapphireTest
10
{
11
    /**
12
     * @var string
13
     */
14
    protected static $fixture_file = '../fixtures.yml';
15
16
    /**
17
     * @var array
18
     */
19
    protected static $extra_dataobjects = [
20
        TestProduct::class,
21
    ];
22
23
    /**
24
     *
25
     */
26
    public function testGetCMSFields()
27
    {
28
        $object = $this->objFromFixture(TestProduct::class, 'one');
29
        $fields = $object->getCMSFields();
30
        $this->assertInstanceOf(FieldList::class, $fields);
31
    }
32
}
33