You are here

public function MetadataBagTest::testSkipLastUsedUpdate in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\MetadataBagTest::testSkipLastUsedUpdate()

File

vendor/symfony/http-foundation/Tests/Session/Storage/MetadataBagTest.php, line 103

Class

MetadataBagTest
Test class for MetadataBag.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage

Code

public function testSkipLastUsedUpdate() {
  $bag = new MetadataBag('', 30);
  $timeStamp = time();
  $created = $timeStamp - 15;
  $sessionMetadata = array(
    MetadataBag::CREATED => $created,
    MetadataBag::UPDATED => $created,
    MetadataBag::LIFETIME => 1000,
  );
  $bag
    ->initialize($sessionMetadata);
  $this
    ->assertEquals($created, $sessionMetadata[MetadataBag::UPDATED]);
}