Passed
Pull Request — master (#7)
by Raúl
01:42
created

Rejected   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
dl 0
loc 19
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 6 1
1
<?php
2
3
namespace Pagantis\SeleniumFormUtils\Step;
4
5
use Facebook\WebDriver\WebDriverBy;
6
7
/**
8
 * Class Returning
9
 *
10
 * @package Pagantis\SeleniumFormUtils\Step
11
 */
12
class Rejected extends AbstractStep
13
{
14
    /**
15
     * Handler step
16
     */
17
    const STEP = 'Rejected';
18
19
    /**
20
     * Forth step reject an order and return tu shop
21
     *
22
     * @param bool $rejected
23
     * @throws \Exception
24
     */
25
    public function run($rejected = false)
26
    {
27
        var_dump("rejected");
0 ignored issues
show
Security Debugging Code introduced by
var_dump('rejected') looks like debug code. Are you sure you do not want to remove it?
Loading history...
28
        $this->validateStep(self::STEP);
29
        $formContinue = $this->webDriver->findElement(WebDriverBy::name('back_to_store_button'));
30
        $formContinue->click();
31
    }
32
}
33