| Total Complexity | 1 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CallbackDependencyTest extends DependencyTestCase |
||
| 8 | { |
||
| 9 | private function getDependency(callable $callback, $dependencyData): Dependency |
||
| 10 | { |
||
| 11 | $dependency = new CallbackDependency($callback); |
||
| 12 | $this->setInaccessibleProperty($dependency, 'data', $dependencyData); |
||
| 13 | return $dependency; |
||
| 14 | } |
||
| 15 | |||
| 16 | public function testPlainClosure(): void |
||
| 17 | { |
||
| 18 | $dependency = $this->getDependency(static function () { |
||
| 19 | return true; |
||
| 20 | }, true); |
||
| 21 | |||
| 22 | $this->assertDependencyNotChanged($dependency); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function testScopeWithObject(): void |
||
| 40 | } |
||
| 41 | } |
||
| 42 |