<?php
include 'util/test_config.php';
include 'util/string_utils.php';
$api = apiAsSuper();
$protections = $api->serverProtectionsGet('localhost');
assert(count($protections->getProtections()) >= 2);
$list = $protections->getProtections();
array_push($list, 'super user jdoe * //...');
$protections->setProtections($list);
$api->serverProtectionsPut('localhost', $protections);
$updated = $api->serverProtectionsGet('localhost');
assert(in_array('super user jdoe * //...', $updated->getProtections()));
array_pop($list);
$updated->setProtections($list);
$api->serverProtectionsPut('localhost', $updated);
$updated = $api->serverProtectionsGet('localhost');
assert(!in_array('super user jdoe * //...', $updated->getProtections()));
# |
Change |
User |
Description |
Committed |
|
#1
|
19553 |
swellard |
Move and rename clients |
|
|
//guest/perforce_software/helix-web-services/main/source/clients/2016.1.0/php/tests/default_api.server_protections.basic_add-remove_tests.php |
#1
|
19259 |
tjuricek |
PHP Client SDK tests: labels, paths, protections, servers, triggers, users |
|
|