Code Duplication    Length = 8-8 lines in 4 locations

tests/Unit/StopperTest.php 4 locations

@@ 26-33 (lines=8) @@
23
     * @expectedException LogicException
24
     * @expectedExceptionMessage Port, Url, Shutdown Url, Shutdown Options, and Query are mandatory.
25
     */
26
    public function testNoQueryThrowsException()
27
    {
28
        $this->seleniumOptions->expects($this->any())->method('getSeleniumUrl')->willReturn('not_empty');
29
        $this->seleniumOptions->expects($this->any())->method('getSeleniumPort')->willReturn('not_empty');
30
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutdownUrl')->willReturn('not_empty');
31
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutDownOptions')->willReturn('not_empty');
32
        $this->stopper->stop();
33
    }
34
35
    /**
36
     * @expectedException LogicException
@@ 39-46 (lines=8) @@
36
     * @expectedException LogicException
37
     * @expectedExceptionMessage Port, Url, Shutdown Url, Shutdown Options, and Query are mandatory.
38
     */
39
    public function testNoUrlThrowsException()
40
    {
41
        $this->seleniumOptions->expects($this->any())->method('getSeleniumQuery')->willReturn('not_empty');
42
        $this->seleniumOptions->expects($this->any())->method('getSeleniumPort')->willReturn('not_empty');
43
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutdownUrl')->willReturn('not_empty');
44
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutDownOptions')->willReturn('not_empty');
45
        $this->stopper->stop();
46
    }
47
48
    /**
49
     * @expectedException LogicException
@@ 52-59 (lines=8) @@
49
     * @expectedException LogicException
50
     * @expectedExceptionMessage Port, Url, Shutdown Url, Shutdown Options, and Query are mandatory.
51
     */
52
    public function testNoPortThrowsException()
53
    {
54
        $this->seleniumOptions->expects($this->any())->method('getSeleniumQuery')->willReturn('not_empty');
55
        $this->seleniumOptions->expects($this->any())->method('getSeleniumUrl')->willReturn('not_empty');
56
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutdownUrl')->willReturn('not_empty');
57
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutDownOptions')->willReturn('not_empty');
58
        $this->stopper->stop();
59
    }
60
61
    /**
62
     * @expectedException LogicException
@@ 65-72 (lines=8) @@
62
     * @expectedException LogicException
63
     * @expectedExceptionMessage Port, Url, Shutdown Url, Shutdown Options, and Query are mandatory.
64
     */
65
    public function testNoShutdownOptionsThrowsException()
66
    {
67
        $this->seleniumOptions->expects($this->any())->method('getSeleniumPort')->willReturn('not_empty');
68
        $this->seleniumOptions->expects($this->any())->method('getSeleniumQuery')->willReturn('not_empty');
69
        $this->seleniumOptions->expects($this->any())->method('getSeleniumUrl')->willReturn('not_empty');
70
        $this->seleniumOptions->expects($this->any())->method('getSeleniumShutdownUrl')->willReturn('not_empty');
71
        $this->stopper->stop();
72
    }
73
74
    public function testStopperStops()
75
    {