forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shim.php
72 lines (58 loc) · 2.53 KB
/
shim.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
// @codingStandardsIgnoreStart
namespace {
\Codeception\PHPUnit\Init::init();
}
namespace Symfony\Component\CssSelector {
if (!class_exists('Symfony\Component\CssSelector\CssSelectorConverter')) {
class CssSelectorConverter {
function toXPath($cssExpr, $prefix = 'descendant-or-self::') {
return CssSelector::toXPath($cssExpr, $prefix);
}
}
}
}
// prefering old names
namespace Codeception\TestCase {
class Test extends \Codeception\Test\Unit {
}
}
namespace Codeception\Module {
class Symfony2 extends Symfony {
}
class Phalcon1 extends Phalcon {
}
class Phalcon2 extends Phalcon {
}
}
namespace Codeception\Platform {
abstract class Group extends \Codeception\GroupObject
{
}
abstract class Extension extends \Codeception\Extension
{
}
}
namespace {
class_alias('Codeception\TestInterface', 'Codeception\TestCase');
// loading WebDriver aliases
if (!class_exists('RemoteWebDriver') and class_exists('Facebook\WebDriver\Remote\RemoteWebDriver')) {
class RemoteWebDriver extends \Facebook\WebDriver\Remote\RemoteWebDriver {};
class InvalidSelectorException extends Facebook\WebDriver\Exception\InvalidSelectorException {};
class NoSuchElementException extends Facebook\WebDriver\Exception\NoSuchElementException {};
class WebDriverCurlException extends Facebook\WebDriver\Exception\WebDriverCurlException {};
class WebDriverActions extends Facebook\WebDriver\Interactions\WebDriverActions {};
class LocalFileDetector extends Facebook\WebDriver\Remote\LocalFileDetector {};
class WebDriverCapabilityType extends Facebook\WebDriver\Remote\WebDriverCapabilityType {};
class WebDriverAlert extends Facebook\WebDriver\WebDriverAlert {};
class WebDriverBy extends Facebook\WebDriver\WebDriverBy {};
class WebDriverDimension extends Facebook\WebDriver\WebDriverDimension {};
class RemoteWebElement extends Facebook\WebDriver\Remote\RemoteWebElement {};
class WebDriverExpectedCondition extends Facebook\WebDriver\WebDriverExpectedCondition {};
class WebDriverKeys extends Facebook\WebDriver\WebDriverKeys {};
class WebDriverSelect extends Facebook\WebDriver\WebDriverSelect {};
class WebDriverTimeouts extends Facebook\WebDriver\WebDriverTimeouts {};
class WebDriverWindow extends Facebook\WebDriver\WebDriverWindow {};
interface WebDriverElement extends Facebook\WebDriver\WebDriverElement {};
}
}