1 | <?php |
||
21 | class TestUserFactory implements TestUserFactoryInterface |
||
22 | { |
||
23 | const DEFAULT_USER_EMAIL = '[email protected]'; |
||
24 | const DEFAULT_USER_FIRST_NAME = 'John'; |
||
25 | const DEFAULT_USER_LAST_NAME = 'Doe'; |
||
26 | const DEFAULT_USER_PASSWORD = 'password123'; |
||
27 | |||
28 | /** |
||
29 | * @var FactoryInterface |
||
30 | */ |
||
31 | private $customerFactory; |
||
32 | |||
33 | /** |
||
34 | * @var FactoryInterface |
||
35 | */ |
||
36 | private $userFactory; |
||
37 | |||
38 | /** |
||
39 | * @param FactoryInterface $customerFactory |
||
40 | * @param FactoryInterface $userFactory |
||
41 | */ |
||
42 | public function __construct(FactoryInterface $customerFactory, FactoryInterface $userFactory) |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function create($email, $password, $firstName = self::DEFAULT_USER_FIRST_NAME, $lastName = self::DEFAULT_USER_LAST_NAME) |
||
68 | |||
69 | /** |
||
70 | * @return UserInterface |
||
71 | */ |
||
72 | public function createDefault() |
||
81 | } |
||
82 |