Completed
Push — master ( 9fec5b...0ee870 )
by Andrii
06:47 queued 10s
created

AssignHubs   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 10
dl 0
loc 23
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A checkAssigned() 0 6 1
A fillAssignForm() 0 5 1
A needGoToAssignForm() 0 6 1
1
<?php
2
3
namespace hipanel\modules\server\tests\_support\Page\Hub;
4
5
use Codeception\Example;
0 ignored issues
show
Bug introduced by
The type Codeception\Example was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class AssignHubs extends Hub
8
{
9
    public function needGoToAssignForm(string $linkName = 'assign-switches')
10
    {
11
        $this->tester->seeInCurrentUrl('view?id');
12
        $this->tester->click("div.box-menu a[href*=\"{$linkName}\"]");
13
        $this->waitPjax();
14
        $this->tester->seeInCurrentUrl("{$linkName}");
15
    }
16
17
    public function fillAssignForm(Example $data): self
18
    {
19
        $this->fillForm($data);
20
21
        return $this;
22
    }
23
24
    public function checkAssigned(Example $data): self
25
    {
26
        $this->tester->seeInCurrentUrl('view?id');
27
        $this->check($data);
28
29
        return $this;
30
    }
31
}
32