OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
firebase
/
vendor
/
google
/
cloud-storage
/
tests
/
System
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/12/2024 10:33:53 AM
rwxr-xr-x
📄
BucketLockRetentionPolicyTest.php
1.72 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
BucketRpoTest.php
2.44 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
HmacKeyTest.php
4.84 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
HoldObjectsTest.php
1.7 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
IamConfigurationTest.php
7.52 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
IamTest.php
3.71 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
KmsTest.php
5.45 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
ManageAclTest.php
2.25 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
ManageBucketsTest.php
16.3 KB
08/12/2024 10:33:52 AM
rw-r--r--
📄
ManageNotificationsTest.php
1.9 KB
08/12/2024 10:33:53 AM
rw-r--r--
📄
ManageObjectsTest.php
16.28 KB
08/12/2024 10:33:53 AM
rw-r--r--
📄
PostPolicyTest.php
4.49 KB
08/12/2024 10:33:53 AM
rw-r--r--
📄
README.md
835 bytes
08/12/2024 10:33:53 AM
rw-r--r--
📄
RequesterPaysTest.php
15.14 KB
08/12/2024 10:33:53 AM
rw-r--r--
📄
SignedUrlTest.php
7.93 KB
08/12/2024 10:33:53 AM
rw-r--r--
📄
StorageTestCase.php
2.5 KB
08/12/2024 10:33:53 AM
rw-r--r--
📁
StreamWrapper
-
08/12/2024 10:35:02 AM
rwxr-xr-x
📄
UploadObjectsTest.php
4.7 KB
08/12/2024 10:33:53 AM
rw-r--r--
📄
bootstrap.php
180 bytes
08/12/2024 10:33:52 AM
rw-r--r--
📁
data
-
08/12/2024 10:35:01 AM
rwxr-xr-x
Editing: HoldObjectsTest.php
Close
<?php /** * Copyright 2018 Google Inc. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ namespace Google\Cloud\Storage\Tests\System; use Google\Cloud\Core\Exception\ServiceException; /** * @group storage * @group storage-object * @group storage-object-hold */ class HoldObjectsTest extends StorageTestCase { /** * @dataProvider holdTypeProvider */ public function testHold($holdType) { $code = null; // Upload an object with a hold enabled. $object = self::$bucket->upload('test-hold', [ 'name' => 'test-hold.txt', 'metadata' => [ $holdType => true ] ]); try { $object->delete(); } catch (ServiceException $ex) { $code = $ex->getCode(); } $this->assertEquals(403, $code); // Disable the hold. $object->update([ $holdType => false ]); $this->assertNull($object->delete()); } public function holdTypeProvider() { return [ ['temporaryHold'], ['eventBasedHold'] ]; } }