public function SessionHandlerProxyTest::testOpen

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php, line 47

Class

SessionHandlerProxyTest
Tests for SessionHandlerProxy class.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage\Proxy

Code

public function testOpen() {
  $this->mock
    ->expects($this
    ->once())
    ->method('open')
    ->will($this
    ->returnValue(true));
  $this
    ->assertFalse($this->proxy
    ->isActive());
  $this->proxy
    ->open('name', 'id');
  if (version_compare(phpversion(), '5.4.0', '<')) {
    $this
      ->assertTrue($this->proxy
      ->isActive());
  }
  else {
    $this
      ->assertFalse($this->proxy
      ->isActive());
  }
}