public static function tearDownAfterClass() { foreach (static::$search_content as $key => $object) { (new Command\Builder\DeleteObject(static::$riak))->buildLocation($key, 'sabres', self::SEARCH_BUCKET_TYPE)->build()->execute(); } parent::tearDownAfterClass(); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); // make completely random key/bucket based on time static::$key = md5(rand(0, 99) . time()); static::$bucket = md5(rand(0, 99) . time()); }
public static function tearDownAfterClass() { foreach (static::$mr_content as $key => $object) { $command = (new Command\Builder\DeleteObject(static::$riak))->buildLocation($key, 'phptest_mr')->build(); $command->execute(); } parent::tearDownAfterClass(); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); try { $command = (new Command\Builder\FetchBucketProperties(static::$riak))->buildBucket('test', static::HLL_BUCKET_TYPE)->build(); $response = $command->execute(); if ($response->isSuccess() && $response->getCode() == 200) { static::$hll_present = true; } } catch (\Exception $ex) { static::$hll_present = false; } }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); // make completely random key based on time static::$key = md5(rand(0, 99) . time()); try { // Skip this suite if the "hlls" bucket type is not present $command = (new Command\Builder\FetchBucketProperties(static::$riak))->buildBucket('test', static::HLL_BUCKET_TYPE)->build(); $response = $command->execute(); if (!$response->isSuccess() || $response->getCode() != 200) { throw new \PHPUnit_Framework_SkippedTestSuiteError("hlls bucket type is not enabled and activated, skipping"); } } catch (\Exception $ex) { throw new \PHPUnit_Framework_SkippedTestSuiteError("hlls bucket type is not enabled and activated, skipping"); } }
public static function tearDownAfterClass() { shell_exec('sudo riak-admin security disable'); parent::tearDownAfterClass(); }
public static function tearDownAfterClass() { parent::tearDownAfterClass(); }
public static function setUpBeforeClass() { parent::setUpBeforeClass(); static::populateKey(); }