You are here

protected function MemcachedSessionHandlerTest::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MemcachedSessionHandlerTest::setUp()

File

vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php, line 28

Class

MemcachedSessionHandlerTest

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler

Code

protected function setUp() {
  if (!class_exists('Memcached')) {
    $this
      ->markTestSkipped('Skipped tests Memcached class is not present');
  }
  if (version_compare(phpversion('memcached'), '2.2.0', '>=')) {
    $this
      ->markTestSkipped('Tests can only be run with memcached extension 2.1.0 or lower');
  }
  $this->memcached = $this
    ->getMock('Memcached');
  $this->storage = new MemcachedSessionHandler($this->memcached, array(
    'prefix' => self::PREFIX,
    'expiretime' => self::TTL,
  ));
}