public function StoreTest::testLocking

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php, line 216

Class

StoreTest

Namespace

Symfony\Component\HttpKernel\Tests\HttpCache

Code

public function testLocking() {
  $req = Request::create('/test', 'get', array(), array(), array(), array(
    'HTTP_FOO' => 'Foo',
    'HTTP_BAR' => 'Bar',
  ));
  $this
    ->assertTrue($this->store
    ->lock($req));
  $path = $this->store
    ->lock($req);
  $this
    ->assertTrue($this->store
    ->isLocked($req));
  $this->store
    ->unlock($req);
  $this
    ->assertFalse($this->store
    ->isLocked($req));
}