Completed
Pull Request — master (#62)
by Jason
17:50 queued 02:52
created

EmbedBlockTest::testGetCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Dynamic\DynamicBlocks\Test;
4
5
use Dynamic\DynamicBlocks\Block\EmbedBlock;
6
use SilverStripe\Dev\SapphireTest;
7
use SilverStripe\Forms\FieldList;
8
9
class EmbedBlockTest extends SapphireTest
10
{
11
    /**
12
     * @var string
13
     */
14
    protected static $fixture_file = 'dynamic-blocks/tests/Fixtures.yml';
15
16
    /**
17
     *
18
     */
19
    public function testGetCMSFields()
20
    {
21
        $object = $this->objFromFixture(EmbedBlock::class, 'one');
22
        $fields = $object->getCMSFields();
23
        $this->assertInstanceOf(FieldList::class, $fields);
24
        //$this->assertNotNull($fields->dataFieldByName('EmbeddedObject')); // todo readd once Linkable is SS4 compatible
0 ignored issues
show
Unused Code Comprehensibility introduced by
77% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
25
    }
26
}
27