Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 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";
         }
     }
 }
Exemplo n.º 3
0
 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;
             }
         }
     }
 }
Exemplo n.º 4
0
 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
     API::userClear(self::$config['userID']);
 }
Exemplo n.º 5
0
 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
     API::userClear(self::$config['userID']);
     API::groupClear(self::$config['ownedPrivateGroupID']);
 }
Exemplo n.º 6
0
 public static function tearDownAfterClass()
 {
     parent::tearDownAfterClass();
     require 'include/config.inc.php';
     API::userClear($config['userID']);
 }
Exemplo n.º 7
0
 public function setUp()
 {
     parent::setUp();
     API::userClear(self::$config['userID']);
 }
Exemplo n.º 8
0
 public function setUp()
 {
     parent::setUp();
     API::useAPIVersion(2);
 }
Exemplo n.º 9
0
 public function setUp()
 {
     parent::setUp();
     API::userClear(self::$config['userID']);
     API::groupClear(self::$config['ownedPrivateGroupID']);
 }
Exemplo n.º 10
0
 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']]);
 }