Ejemplo n.º 1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function setUp()
 {
     // Skip these tests if WinCache isn't available.
     if (!StorageWincache::isSupported()) {
         $this->markTestSkipped('WinCache storage is not enabled on this system.');
     }
     $this->object = Storage::getInstance('Wincache');
 }
Ejemplo n.º 2
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function setUp()
 {
     parent::setUp();
     // Skip these tests if APC isn't available.
     if (!StorageAPC::isSupported()) {
         $this->markTestSkipped('APC storage is not enabled on this system.');
     }
     $this->object = Storage::getInstance('APC');
 }
Ejemplo n.º 3
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function setUp()
 {
     if (!class_exists('Memcached')) {
         $this->markTestSkipped('The Memcached class does not exist.');
         return;
     }
     // Create the caching object
     static::$object = Storage::getInstance('Memcached');
     // Parent contains the rest of the setup
     parent::setUp();
 }
Ejemplo n.º 4
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $this->object = Storage::getInstance('None');
 }
Ejemplo n.º 5
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  *
  * @return  void
  *
  * @since   1.0
  */
 protected function setUp()
 {
     parent::setUp();
     $this->object = Storage::getInstance('Database', array('db' => static::$driver));
 }
Ejemplo n.º 6
0
 /**
  * Constructor
  *
  * @param   string  $store    The type of storage for the session.
  * @param   array   $options  Optional parameters
  *
  * @since   1.0
  */
 public function __construct($store = 'none', array $options = array())
 {
     // Need to destroy any existing sessions started with session.auto_start
     if (session_id()) {
         session_unset();
         session_destroy();
     }
     // Disable transparent sid support
     ini_set('session.use_trans_sid', '0');
     // Only allow the session ID to come from cookies and nothing else.
     ini_set('session.use_only_cookies', '1');
     // Create handler
     $this->store = Storage::getInstance($store, $options);
     $this->storeName = $store;
     // Set options
     $this->_setOptions($options);
     $this->_setCookieParams();
     $this->setState('inactive');
 }