Passed
Push — master ( 9447cf...76f63b )
by Thomas
06:46
created

Test_ActionsPage::getCMSActions()   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
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace LeKoala\CmsActions\Test;
4
5
use SilverStripe\Dev\TestOnly;
6
use LeKoala\CmsActions\CustomAction;
7
use SilverStripe\CMS\Model\SiteTree;
8
9
class Test_ActionsPage extends SiteTree implements TestOnly
10
{
11
    private static $table_name = 'ActionsPage';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
12
13
    public function getCMSActions()
14
    {
15
        $actions = parent::getCMSActions();
16
        $actions->push(new CustomAction('testAction', 'Test Action'));
17
        return $actions;
18
    }
19
20
    public function testAction()
21
    {
22
        return 'called testAction';
23
    }
24
}
25