public removeAttribute ( string $key ) : void | ||
$key | string | The key of the value to delete |
return | void |
public function removeAttribute($key)
{
$this->storage->remove($key);
}
/** * Tests the if the method to remove a attribute works. * * @return void */ public function testRemoveAttribute() { $integerValue = 10; $this->initialContext->setAttribute('integerValue', $integerValue); $this->assertEquals($integerValue, $this->initialContext->getAttribute('integerValue')); $this->initialContext->removeAttribute('integerValue'); $this->assertFalse($this->initialContext->getAttribute('integerValue')); }