/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { parent::setUp(); $this->object = new Mysql(); $this->uri = 'localhost/test/m_files'; $this->options = array('user' => 'root', 'pass' => ''); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { parent::setUp(); $this->dsnMap = array('Local' => array('dsn' => 'Local://' . DIR_WORK, 'options' => array('permission' => 0644)), 'Local2' => array('dsn' => 'Local://' . DIR_TMP, 'options' => array('permission' => 0644)), 'AmazonS3' => array('dsn' => 'AmazonS3://' . $_SERVER['AWS_REGION_NAME'] . '/' . $_SERVER['AWS_S3_BUCKET'], 'options' => array('key' => $_SERVER['AWS_ACCESS_KEY'], 'secret' => $_SERVER['AWS_SECRET_KEY'], 'default_cache_config' => '', 'certificate_autority' => false))); $def = $this->dsnMap['Local']; $this->object = new Storage($def['dsn'], $def['options'], false); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->dsn = DIR_WORK; // new $this->object = new Local(); clearstatcache(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { parent::setUp(); $this->dsnMap = array('Local' => array('dsn' => 'Local://' . DIR_WORK, 'options' => array('permission' => 0644)), 'Local2' => array('dsn' => 'Local://' . DIR_TMP, 'options' => array('permission' => 0644)), 'AmazonS3' => array('dsn' => 'AmazonS3://' . $_SERVER['AWS_REGION_NAME'] . '/' . $_SERVER['AWS_S3_BUCKET'], 'options' => array('key' => $_SERVER['AWS_ACCESS_KEY'], 'secret' => $_SERVER['AWS_SECRET_KEY'], 'default_cache_config' => '', 'certificate_autority' => false))); $this->example_text = file_get_contents($this->org_example); $def = $this->dsnMap['Local']; $this->object = new \mychaelstyle\storage\Factory(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { parent::setUp(); $this->dsn = 'Local://' . DIR_WORK; $this->options = array('permission' => 0666); $this->uri = 'tmp.txt'; $this->storage = new \mychaelstyle\Storage($this->dsn); $this->object = $this->storage->createFile($this->uri, $this->options); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->object = new AmazonDynamoDB(); // set your aws key and secret to your env $this->dsn = 'AmazonDynamoDB://REGION_' . $_SERVER['AWS_REGION_NAME'] . '/tests'; $this->uri = $_SERVER['AWS_REGION_NAME'] . '/tests'; $this->options = array('key' => $_SERVER['AWS_ACCESS_KEY'], 'secret' => $_SERVER['AWS_SECRET_KEY'], 'default_cache_config' => '', 'certificate_autority' => false); // curl options $this->options['curlopts'] = array(CURLOPT_SSL_VERIFYPEER => false); $this->object = new AmazonDynamoDB(); $this->object->connect($this->uri, $this->options); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ public function setUp() { parent::setUp(); $this->path_example = DIR_FIXTURES . '/example.txt'; $this->uri = 'example.txt'; $this->url = 'https://' . $_SERVER['AWS_REGION_HOST'] . '/' . $_SERVER['AWS_S3_BUCKET'] . '/' . $this->uri; // dsn $this->dsn = $_SERVER['AWS_REGION_NAME'] . '/' . $_SERVER['AWS_S3_BUCKET']; // set your aws key and secret to your env $this->options = array('key' => $_SERVER['AWS_ACCESS_KEY'], 'secret' => $_SERVER['AWS_SECRET_KEY'], 'default_cache_config' => '', 'certificate_autority' => false); // connect $this->object = new AmazonS3(); $this->object->connect($this->dsn, $this->options); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. */ protected function setUp() { parent::setUp(); $this->object = new File(); $this->example_text = file_get_contents($this->org_example); }