Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 4
CRAP
0.00% covered (danger)
0.00%
0 / 1
DummyUser
0.00% covered (danger)
0.00%
0 / 6
0.00% covered (danger)
0.00%
0 / 4
20
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 getId
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 hasPasswordWithUppercase
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
 hasPasswordWithLowercase
0.00% covered (danger)
0.00%
0 / 2
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3namespace Apie\Dataset\DummyApp\Resources;
4
5use Apie\Core\Entities\EntityInterface;
6use Apie\Core\ValueObjects\NonEmptyString;
7use Apie\Dataset\DummyApp\Identifiers\DummyUserIdentifier;
8
9class DummyUser implements EntityInterface
10{
11    private DummyUserIdentifier $id;
12
13    public function __construct(private NonEmptyString $password)
14    {
15        $this->id = DummyUserIdentifier::createRandom();
16    }
17
18    public function getId(): DummyUserIdentifier
19    {
20        return $this->id;
21    }
22
23    public function hasPasswordWithUppercase(): bool
24    {
25        $pw = $this->password->toNative();
26        return mb_strtolower($pw) !== $pw;
27    }
28
29    public function hasPasswordWithLowercase(): bool
30    {
31        $pw = $this->password->toNative();
32        return mb_strtoupper($pw) !== $pw;
33    }
34}