SeleniumDownloaderOptions::getSeleniumVersion()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace BeubiQA\Application\Selenium\Options;
4
5
class SeleniumDownloaderOptions extends SeleniumOptions
6
{
7
    // example full url: http://selenium-release.storage.googleapis.com/2.47/selenium-server-standalone-2.47.1.jar
8
    protected $seleniumDestination = '.';
9
    protected $seleniumVersion = '2.44';
10
    protected $seleniumDownloadUrl = 'http://selenium-release.storage.googleapis.com/%s/%s';
11
12
    public function getSeleniumDownloadUrl()
13
    {
14
        $versionCut = substr($this->getSeleniumVersion(), 0, -2);
15
16
        return sprintf(
17
            $this->seleniumDownloadUrl,
18
            $versionCut,
19
            'selenium-server-standalone-'.$this->getSeleniumVersion().'.jar'
20
        );
21
    }
22
23
    public function setSeleniumDownloadUrl($seleniumDownloadUrl)
24
    {
25
        $this->seleniumDownloadUrl = $seleniumDownloadUrl;
26
    }
27
28
    public function getSeleniumDestination()
29
    {
30
        return $this->seleniumDestination;
31
    }
32
33
    public function setSeleniumDestination($seleniumDestination)
34
    {
35
        $this->seleniumDestination = $seleniumDestination;
36
    }
37
38
    public function getSeleniumVersion()
39
    {
40
        return $this->seleniumVersion;
41
    }
42
43
    public function setSeleniumVersion($seleniumVersion)
44
    {
45
        $this->seleniumVersion = $seleniumVersion;
46
    }
47
}
48