Completed
Push — master ( db7992...03e2a4 )
by Simon
02:23
created

PartialFieldSubmissionTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 5
c 1
b 1
f 0
lcom 1
cbo 2
dl 0
loc 34
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanView() 0 4 1
A testCanCreate() 0 4 1
A testCanEdit() 0 4 1
A testCanDelete() 0 4 1
A setUp() 0 5 1
1
<?php
2
3
namespace Firesphere\PartialUserforms\Tests;
4
5
use Firesphere\PartialUserforms\Models\PartialFieldSubmission;
6
use SilverStripe\Dev\SapphireTest;
7
8
class PartialFieldSubmissionTest extends SapphireTest
9
{
10
11
    /**
12
     * @var PartialFieldSubmission
13
     */
14
    protected $field;
15
    
16
    public function testCanView()
17
    {
18
        $this->assertFalse($this->field->canView());
19
    }
20
    
21
    public function testCanCreate()
22
    {
23
        $this->assertTrue($this->field->canCreate());
24
    }
25
    
26
    public function testCanEdit()
27
    {
28
        $this->assertFalse($this->field->canEdit());
29
    }
30
    
31
    public function testCanDelete()
32
    {
33
        $this->assertFalse($this->field->canDelete());
34
    }
35
    
36
    protected function setUp()
37
    {
38
        $this->field = PartialFieldSubmission::create();
39
        return parent::setUp();
40
    }
41
}