removeAttribute() 공개 메소드

Removes the attribute with the passed key from the initial context.
public removeAttribute ( string $key ) : void
$key string The key of the value to delete
리턴 void
예제 #1
0
 /**
  * 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'));
 }