Code Duplication    Length = 8-11 lines in 2 locations

tests/Unit/StarterTest.php 2 locations

@@ 63-70 (lines=8) @@
60
     * @expectedException RuntimeException
61
     * @expectedExceptionMessage Selenium jar is not a file
62
     */
63
    public function testNotAFileThrowsException()
64
    {
65
        $jarLocation = __DIR__.'/../fixtures';
66
        $this->seleniumOptions->expects($this->any())->method('getSeleniumQuery')->willReturn('not_empty');
67
        $this->seleniumOptions->expects($this->any())->method('getSeleniumUrl')->willReturn('not_empty');
68
        $this->seleniumOptions->expects($this->any())->method('getSeleniumJarLocation')->willReturn($jarLocation);
69
        $this->starter->start();
70
    }
71
72
    /**
73
     * @expectedException RuntimeException
@@ 76-86 (lines=11) @@
73
     * @expectedException RuntimeException
74
     * @expectedExceptionMessage Selenium jar not readable
75
     */
76
    public function testNotReadableThrowsException()
77
    {
78
        $jarLocation = __DIR__.'/../fixtures/selenium-no-permissions.jar';
79
80
        chmod($jarLocation, 000);
81
82
        $this->seleniumOptions->expects($this->any())->method('getSeleniumQuery')->willReturn('not_empty');
83
        $this->seleniumOptions->expects($this->any())->method('getSeleniumUrl')->willReturn('not_empty');
84
        $this->seleniumOptions->expects($this->any())->method('getSeleniumJarLocation')->willReturn($jarLocation);
85
        $this->starter->start();
86
    }
87
88
    public function testStarterStarts()
89
    {