setCurrentName() public method

public setCurrentName ( Name $name = null ) : void
$name Name
return void
 /**
  * @test
  */
 public function containWithSplObjectStorageInRuntimeEvaluation()
 {
     $targetClass = new Fixtures\TargetClass01();
     $name = new Fixtures\Name('Flow');
     $otherName = new Fixtures\Name('Neos');
     $splObjectStorage = new \SplObjectStorage();
     $splObjectStorage->attach($name);
     $targetClass->setCurrentName($name);
     $this->assertEquals('Hello, special guest', $targetClass->greetMany($splObjectStorage));
     $targetClass->setCurrentName(null);
     $this->assertEquals('Hello, Flow', $targetClass->greetMany($splObjectStorage));
     $targetClass->setCurrentName($otherName);
     $this->assertEquals('Hello, Flow', $targetClass->greetMany($splObjectStorage));
 }