You are here

public function StoreTest::testLocking in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php \Symfony\Component\HttpKernel\Tests\HttpCache\StoreTest::testLocking()

File

vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php, line 222

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));
}