public function addWrapper($name, $callback)
 {
     $wrap = array();
     if ($this->viewHelperVariableContainer->exists('Flowpack\\Expose\\ViewHelpers\\WrapViewHelper', $name)) {
         $wrap = $this->viewHelperVariableContainer->get('Flowpack\\Expose\\ViewHelpers\\WrapViewHelper', $name);
     }
     $wrap[] = $callback;
     $this->viewHelperVariableContainer->addOrUpdate('Flowpack\\Expose\\ViewHelpers\\WrapViewHelper', $name, $wrap);
 }
 /**
  * @test
  */
 public function addOrUpdateOverridesAnExistingKey()
 {
     $this->viewHelperVariableContainer->add('TYPO3\\Fluid\\ViewHelper\\NonExistent', 'someKey', 'value1');
     $this->viewHelperVariableContainer->addOrUpdate('TYPO3\\Fluid\\ViewHelper\\NonExistent', 'someKey', 'value2');
     $this->assertEquals($this->viewHelperVariableContainer->get('TYPO3\\Fluid\\ViewHelper\\NonExistent', 'someKey'), 'value2');
 }
 /**
  * @test
  */
 public function addOrUpdateWorks()
 {
     $this->viewHelperVariableContainer->add('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey', 'value1');
     $this->viewHelperVariableContainer->addOrUpdate('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey', 'value2');
     $this->assertEquals($this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelper_NonExistent', 'nonExistentKey'), 'value2');
 }