public function setUp() { parent::setUp(); // Create too-long note content $this->content = str_repeat("1234567890", 25001); // Create JSON template $this->json = API::getItemTemplate("note"); $this->json->note = $this->content; }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $s3Client = Z_Tests::$AWS->get('s3'); foreach (self::$toDelete as $file) { try { $s3Client->deleteObject(['Bucket' => self::$config['s3Bucket'], 'Key' => $file]); } catch (Aws\S3\Exception\NoSuchKeyException $e) { echo "\n{$file} not found on S3 to delete\n"; } } }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); $s3Client = Z_Tests::$AWS->createS3(); foreach (self::$toDelete as $file) { try { $s3Client->deleteObject(['Bucket' => self::$config['s3Bucket'], 'Key' => $file]); } catch (\Aws\S3\Exception\S3Exception $e) { if ($e->getAwsErrorCode() == 'NoSuchKey') { echo "\n{$file} not found on S3 to delete\n"; } else { throw $e; } } } }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); API::userClear(self::$config['userID']); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); API::userClear(self::$config['userID']); API::groupClear(self::$config['ownedPrivateGroupID']); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); require 'include/config.inc.php'; API::userClear($config['userID']); }
public function setUp() { parent::setUp(); API::userClear(self::$config['userID']); }
public function setUp() { parent::setUp(); API::useAPIVersion(2); }
public function setUp() { parent::setUp(); API::userClear(self::$config['userID']); API::groupClear(self::$config['ownedPrivateGroupID']); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); // Clear subscription $response = API::post('users/' . self::$config['userID'] . '/storageadmin', 'quota=0&expiration=0', [], ["username" => self::$config['rootUsername'], "password" => self::$config['rootPassword']]); }