forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shim.php
43 lines (34 loc) · 1.05 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
<?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\Platform {
abstract class Group extends \Codeception\GroupObject
{
}
abstract class Extension extends \Codeception\Extension
{
}
}
namespace {
class_alias('Codeception\TestInterface', 'Codeception\TestCase');
//Compatibility with Symfony 5
if (!class_exists('Symfony\Component\EventDispatcher\Event') && class_exists('Symfony\Contracts\EventDispatcher\Event')) {
class_alias('Symfony\Contracts\EventDispatcher\Event', 'Symfony\Component\EventDispatcher\Event');
}
}