Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
17 | private function createAdminStoreContext(): Context |
||
18 | { |
||
19 | $userId = Uuid::randomHex(); |
||
20 | $storeToken = Uuid::randomHex(); |
||
21 | |||
22 | $data = [ |
||
23 | [ |
||
24 | 'id' => $userId, |
||
25 | 'localeId' => $this->getLocaleIdOfSystemLanguage(), |
||
26 | 'username' => 'foobar', |
||
27 | 'password' => 'asdasdasdasd', |
||
28 | 'firstName' => 'Foo', |
||
29 | 'lastName' => 'Bar', |
||
30 | 'email' => Uuid::randomHex() . '@bar.com', |
||
31 | 'storeToken' => $storeToken, |
||
32 | ], |
||
33 | ]; |
||
34 | |||
35 | $this->getContainer()->get('user.repository')->create($data, Context::createDefaultContext()); |
||
36 | |||
37 | return Context::createDefaultContext(new AdminApiSource($userId)); |
||
38 | } |
||
40 |