forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autoload.php
59 lines (52 loc) · 2.42 KB
/
autoload.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
<?php
// for phar
if (file_exists(__DIR__.'/vendor/autoload.php')) {
require_once(__DIR__.'/vendor/autoload.php');
} elseif (file_exists(__DIR__.'/../../autoload.php')) {
require_once __DIR__ . '/../../autoload.php';
}
// 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 {};
}
// function not autoloaded in PHP, thus its a good place for them
function codecept_debug($data)
{
\Codeception\Util\Debug::debug($data);
}
function codecept_root_dir($appendPath = '')
{
return \Codeception\Configuration::projectDir() . $appendPath;
}
function codecept_output_dir($appendPath = '')
{
return \Codeception\Configuration::outputDir() . $appendPath;
}
function codecept_log_dir($appendPath = '')
{
return \Codeception\Configuration::outputDir() . $appendPath;
}
function codecept_data_dir($appendPath = '')
{
return \Codeception\Configuration::dataDir() . $appendPath;
}
function codecept_relative_path($path)
{
return substr($path, strlen(codecept_root_dir()));
}