protected function setUp(): void
{ $this->defaultContext = Context::
createDefaultContext();
$this->userRepository =
$this->
getContainer()->
get('user.repository'
);
} public function testCheckLoginWithoutStoreToken(): void
{ /** @var UserEntity $adminUser */
$adminUser =
$this->userRepository->
search(new Criteria(),
$this->defaultContext
)->
first();
$storeController =
$this->
getStoreController();
$context =
new Context(new AdminApiSource($adminUser->
getId()));
$response =
$storeController->
checkLogin($context)->
getContent();
static::
assertIsString($response);
$response =
json_decode($response, true, 512, \JSON_THROW_ON_ERROR
);
static::
assertNull($response['userInfo'
]);
} public function testLoginWithCorrectCredentials(): void
{