Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
CRAP | |
0.00% |
0 / 1 |
| common_test_TestUser | |
0.00% |
0 / 8 |
|
0.00% |
0 / 5 |
42 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| getIdentifier | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| setPropertyValues | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| getPropertyValues | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
6 | |||
| getRoles | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; under version 2 |
| 7 | * of the License (non-upgradable). |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 17 | * |
| 18 | * Copyright (c) 2015 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT); |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | use oat\oatbox\user\User; |
| 23 | |
| 24 | /** |
| 25 | * @author CRP Henri Tudor - TAO Team |
| 26 | * @license GPLv2 |
| 27 | * |
| 28 | */ |
| 29 | class common_test_TestUser implements User |
| 30 | { |
| 31 | private $properties; |
| 32 | |
| 33 | public function __construct($properties = []) |
| 34 | { |
| 35 | $this->properties = $properties; |
| 36 | } |
| 37 | |
| 38 | public function getIdentifier() |
| 39 | { |
| 40 | return LOCAL_NAMESPACE . 'virtualTestUser'; |
| 41 | } |
| 42 | |
| 43 | public function setPropertyValues($property, $values) |
| 44 | { |
| 45 | $this->properties[$property] = $values; |
| 46 | } |
| 47 | |
| 48 | public function getPropertyValues($property) |
| 49 | { |
| 50 | return isset($this->properties[$property]) |
| 51 | ? $this->properties[$property] |
| 52 | : []; |
| 53 | } |
| 54 | |
| 55 | public function getRoles() |
| 56 | { |
| 57 | return []; |
| 58 | } |
| 59 | } |