Completed
Push — master ( fb1da0...84ba9e )
by Nic
10s
created

TestProductWishListDataExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 5
dl 0
loc 28
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A updateFrontEndRequiredFields() 0 4 1
A updateFrontEndActions() 0 4 1
A updateFrontEndFields() 0 4 1
1
<?php
2
3
/**
4
 * Class TestProductWishListDataExtension
5
 */
6
class TestProductWishListDataExtension extends DataExtension implements TestOnly
7
{
8
9
    /**
10
     * @param RequiredFields $fields
11
     */
12 1
    public function updateFrontEndRequiredFields(RequiredFields $fields)
13
    {
14 1
        $fields->addRequiredField('OtherField');
15 1
    }
16
17
    /**
18
     * @param FieldList $actions
19
     */
20 1
    public function updateFrontEndActions(FieldList $actions)
21
    {
22 1
        $actions->push(FormAction::create('OtherAction')->setTitle('Other Action'));
23 1
    }
24
25
    /**
26
     * @param FieldList $fields
27
     */
28 1
    public function updateFrontEndFields(FieldList $fields)
29
    {
30 1
        $fields->replaceField('OtherField', TextareaField::create('OtherField'));
31 1
    }
32
33
}