SimpleWithDependencyInjectionCest.php
981 Bytes
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
<?php
namespace simpleDI {
use \simpleDIHelpers\NeededHelper as Needed;
class LoadedTestWithDependencyInjectionCest
{
public $a;
public function __construct($optional = 'abc') {}
public function _inject(Needed $a) { $this->a = $a; }
public function testOne() {}
public function testTwo() {}
}
abstract class SkippedAbstractCest
{
public function testNothing() {}
}
class SkippedWithPrivateConstructorCest
{
private function __construct() {}
public function testNothing() {}
}
class AnotherCest
{
public function testSome() {}
}
}
namespace simpleDIHelpers {
class NeededHelper
{
public function _inject(AnotherHelper $a, YetAnotherHelper $b, $optionalParam = 123) {}
}
class AnotherHelper
{
public function __construct() {}
}
class YetAnotherHelper
{
public function __construct() {}
}
}