Code Duplication    Length = 24-24 lines in 2 locations

tests/_support/Page/plan/Update.php 1 location

@@ 15-38 (lines=24) @@
12
13
use hipanel\helpers\Url;
14
15
class Update extends Create
16
{
17
    protected function loadPage()
18
    {
19
        $I = $this->tester;
20
21
        $I->needPage(Url::to(['@plan/update', 'id' => $this->id]));
22
    }
23
24
    protected function savePlan()
25
    {
26
        $I = $this->tester;
27
28
        $I->click('Save');
29
        $I->closeNotification('Plan was successfully updated');
30
    }
31
32
    public function updatePlan($id)
33
    {
34
        $this->id = $id;
35
36
        return $this->createPlan();
37
    }
38
}
39

tests/_support/Page/plan/UpdateGrouping.php 1 location

@@ 15-38 (lines=24) @@
12
13
use yii\helpers\Url;
14
15
class UpdateGrouping extends CreateGrouping
16
{
17
    protected function loadPage()
18
    {
19
        $I = $this->tester;
20
21
        $I->needPage(Url::to(['@plan/update', 'id' => $this->id]));
22
    }
23
24
    protected function savePlan()
25
    {
26
        $I = $this->tester;
27
28
        $I->click('Save');
29
        $I->closeNotification('Plan was successfully updated');
30
    }
31
32
    public function updatePlan($id)
33
    {
34
        $this->id = $id;
35
36
        return $this->createPlan();
37
    }
38
}
39