Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.686 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | 1 | public function createDriver(BrowserConfiguration $browser) |
|
55 | { |
||
56 | 1 | if ( !class_exists('Zumba\Mink\Driver\PhantomJSDriver') ) { |
|
57 | 1 | throw new \RuntimeException( |
|
58 | 'Install MinkPhantomJSDriver in order to use phantomjs driver.' |
||
59 | 1 | ); |
|
60 | } |
||
61 | |||
62 | return new \Zumba\Mink\Driver\PhantomJSDriver(sprintf( |
||
63 | 'http://%s:%s%s', |
||
64 | $browser->getHost(), |
||
65 | $browser->getPort(), |
||
66 | '/api' |
||
67 | )); |
||
68 | } |
||
69 | |||
71 |