You are here

public function NamespacedAttributeBagTest::testRemove in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/Session/Attribute/NamespacedAttributeBagTest.php, line 131

Class

NamespacedAttributeBagTest
Tests NamespacedAttributeBag.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Attribute

Code

public function testRemove() {
  $this
    ->assertEquals('world', $this->bag
    ->get('hello'));
  $this->bag
    ->remove('hello');
  $this
    ->assertNull($this->bag
    ->get('hello'));
  $this
    ->assertEquals('be happy', $this->bag
    ->get('always'));
  $this->bag
    ->remove('always');
  $this
    ->assertNull($this->bag
    ->get('always'));
  $this
    ->assertEquals('drak', $this->bag
    ->get('user.login'));
  $this->bag
    ->remove('user.login');
  $this
    ->assertNull($this->bag
    ->get('user.login'));
}