| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 2 | public function assertConnectionWasUsed($connection, string $message = null) |
|
| 36 | { |
||
| 37 | 2 | $connection = connection($connection, null, $this->config); |
|
| 38 | |||
| 39 | /** @var ComTraceSubject $caller */ |
||
| 40 | $caller = $this->callStack->getStackCollection()->first(function (ComCall $call) { |
||
| 41 | 2 | return $call->getCaller()->getClass() === SWbemLocator::class; |
|
| 42 | 2 | })->getCaller(); |
|
| 43 | |||
| 44 | 2 | $this->testCase::assertEquals( |
|
| 45 | 2 | $connection, |
|
| 46 | 2 | $caller->getArguments()[0], |
|
| 47 | 2 | $message ?? 'Expected connection was not used.' |
|
| 48 | ); |
||
| 51 |