BlocksTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testBlocks() 0 4 1
A getDefaultBlock() 0 3 1
1
<?php
2
3
namespace LeKoala\DeferBackend\Test;
4
5
use LeKoala\Blocks\BaseBlock;
6
use LeKoala\Blocks\Block;
7
use SilverStripe\Dev\SapphireTest;
8
9
class BlocksTest extends SapphireTest
10
{
11
    /**
12
     * Defines the fixture file to use for this test class
13
     * @var string
14
     */
15
    protected static $fixture_file = 'BlocksTest.yml';
16
17
    public function getDefaultBlock()
18
    {
19
        return $this->objFromFixture(Block::class, 'default');
20
    }
21
22
    public function testBlocks()
23
    {
24
        $block = $this->getDefaultBlock();
25
        $baseBlock = new BaseBlock($block);
0 ignored issues
show
Unused Code introduced by
The assignment to $baseBlock is dead and can be removed.
Loading history...
26
    }
27
}
28