Exemplo n.º 1
0
 public function testGetAdapterWithArray()
 {
     // No need to overdo it; we'll test the array config with just one adapter.
     $fileSystemConfig = array(
         Factory::STORAGE_ADAPTER_KEY => 'Zend\Cloud\StorageService\Adapter\FileSystem',
         FileSystem::LOCAL_DIRECTORY  => dirname(__FILE__) ."/_files/data",
     );
     $fileSystemAdapter = Factory::getAdapter($fileSystemConfig);
     $this->assertEquals('Zend\Cloud\StorageService\Adapter\FileSystem', get_class($fileSystemAdapter));
 }
Exemplo n.º 2
0
 public function testNoParams()
 {
     $config = array(Zend\Cloud\StorageService\Factory::STORAGE_ADAPTER_KEY => $this->_config->get(Zend\Cloud\StorageService\Factory::STORAGE_ADAPTER_KEY));
     $this->setExpectedException('Zend\\Cloud\\StorageService\\Exception');
     $s = Zend\Cloud\StorageService\Factory::getAdapter($config);
 }
Exemplo n.º 3
0
 public function setUp()
 {
     $this->_config = $this->_getConfig();
     $this->_commonStorage = Factory::getAdapter($this->_config);
 }
Exemplo n.º 4
0
 public function setUp()
 {
     $this->_config = $this->_getConfig();
     $this->_commonStorage = \Zend\Cloud\StorageService\Factory::getAdapter($this->_config);
 }