| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class UserTest extends \Codeception\Test\Unit |
||
| 10 | { |
||
| 11 | public function testFindUserById(): void |
||
| 12 | { |
||
| 13 | verify($user = User::findIdentity(100))->notEmpty(); |
||
| 14 | verify($user->username)->equals('admin'); |
||
| 15 | |||
| 16 | verify(User::findIdentity(999))->empty(); |
||
| 17 | } |
||
| 18 | |||
| 19 | public function testFindUserByAccessToken(): void |
||
| 20 | { |
||
| 21 | verify($user = User::findIdentityByAccessToken('100-token'))->notEmpty(); |
||
| 22 | verify($user->username)->equals('admin'); |
||
| 23 | |||
| 24 | verify(User::findIdentityByAccessToken('non-existing'))->empty(); |
||
| 25 | } |
||
| 26 | |||
| 27 | public function testFindUserByUsername(): void |
||
| 28 | { |
||
| 29 | verify($user = User::findByUsername('admin'))->notEmpty(); |
||
| 30 | verify(User::findByUsername('not-admin'))->empty(); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @depends testFindUserByUsername |
||
| 35 | */ |
||
| 36 | public function testValidateUser(): void |
||
| 44 | } |
||
| 45 | |||
| 46 | } |
||
| 47 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths