1 | <?php |
||
9 | class MockClientStorage extends MockStorage implements ClientInterface |
||
10 | { |
||
11 | /** |
||
12 | * @inheritdoc |
||
13 | */ |
||
14 | public function get($clientId, $clientSecret = null, $redirectUri = null, $grantType = null) |
||
15 | { |
||
16 | $entity = new ClientEntity($this->server); |
||
17 | |||
18 | $entity->hydrate([ |
||
19 | 'id' => 'test', |
||
20 | 'name' => 'test', |
||
21 | ]); |
||
22 | |||
23 | return $entity; |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | public function getBySession(SessionEntity $entity) |
||
30 | { |
||
31 | $entity = new ClientEntity($this->server); |
||
32 | |||
33 | $entity->hydrate([ |
||
34 | 'id' => 'test', |
||
35 | 'name' => 'test', |
||
36 | ]); |
||
37 | |||
38 | return $entity; |
||
39 | } |
||
40 | } |
||
41 |