Conditions | 2 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
14 | protected function assertObjectUsesTrait(string $trait, $object, string $message = '') |
||
15 | { |
||
16 | $traits = []; |
||
17 | $this->getTraits($object, $traits); |
||
18 | |||
19 | parent::assertThat( |
||
20 | \in_array($trait, $traits), |
||
21 | static::isTrue(), |
||
22 | \mb_strlen($message) |
||
23 | ? $message |
||
24 | : \sprintf( |
||
25 | 'Failed asserting that "%s" is used in object "%s"', |
||
26 | $trait, |
||
27 | \get_class($object) |
||
|
|||
28 | ) |
||
47 |