Conditions | 3 |
Paths | 4 |
Total Lines | 30 |
Code Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | protected function configure() |
||
36 | { |
||
37 | $this->bind(Spy::class)->in(Scope::SINGLETON); |
||
38 | $this->bindInterceptor( |
||
39 | $this->matcher->annotatedWith(\Ray\TestDouble\Annotation\Spy::class), |
||
40 | $this->matcher->any(), |
||
41 | [SpyInterceptor::class] |
||
42 | ); |
||
43 | $this->bindInterceptor( |
||
44 | $this->matcher->any(), |
||
45 | $this->matcher->annotatedWith(\Ray\TestDouble\Annotation\Spy::class), |
||
46 | [SpyInterceptor::class] |
||
47 | ); |
||
48 | foreach ($this->spies as $spy) { |
||
49 | $this->bindInterceptor( |
||
50 | $this->matcher->subclassesOf($spy), |
||
51 | $this->matcher->any(), |
||
52 | [SpyInterceptor::class] |
||
53 | ); |
||
54 | } |
||
55 | $this->bindInterceptor( |
||
56 | $this->matcher->annotatedWith(Fakeable::class), |
||
57 | $this->matcher->any(), |
||
58 | [TestDoubleInterceptor::class] |
||
59 | ); |
||
60 | foreach ($this->fakeables as $fakeable) { |
||
61 | $this->bindInterceptor( |
||
62 | $this->matcher->subclassesOf($fakeable), |
||
63 | $this->matcher->any(), |
||
64 | [TestDoubleInterceptor::class] |
||
65 | ); |
||
69 |