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

Rejected::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 4
nc 1
nop 1
dl 0
loc 6
rs 10
c 1
b 0
f 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