request->usersGroups(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); } /** * @group users_v5 */ public function testUsersList() { $client = static::getApiClient(); $response = $client->request->usersList(); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); } /** * @group users_v5 */ public function testUsersGet() { $client = static::getApiClient(); $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; $response = $client->request->usersGet($user); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); } /** * @group users_v5 */ public function testUsersStatus() { $client = static::getApiClient(); $user = getenv('RETAILCRM_USER') ?: $_SERVER['RETAILCRM_USER']; $response = $client->request->usersStatus($user, 'dinner'); static::assertInstanceOf('RetailCrm\Response\ApiResponse', $response); static::assertTrue(in_array($response->getStatusCode(), [200, 201])); static::assertTrue($response->isSuccessful()); } }