render() public méthode

Render the tag.
public render ( ) : string
Résultat string rendered tag.
 /**
  * @test
  */
 public function prependedOptionLabelIsTranslatedIfTranslateArgumentIsSet()
 {
     $this->tagBuilder->expects($this->once())->method('addAttribute')->with('name', 'myName');
     $this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('myName');
     $this->tagBuilder->expects($this->once())->method('setContent')->with('<option value="">translated label</option>' . chr(10));
     $this->tagBuilder->expects($this->once())->method('render');
     $this->arguments['options'] = array();
     $this->arguments['name'] = 'myName';
     $this->arguments['prependOptionLabel'] = 'select';
     $this->arguments['translate'] = array('by' => 'id', 'using' => 'label');
     $mockTranslator = $this->createMock(\Neos\Flow\I18n\Translator::class);
     $mockTranslator->expects($this->at(0))->method('translateById')->with('select', array(), null, null, 'Main', '')->will($this->returnValue('translated label'));
     $this->viewHelper->_set('translator', $mockTranslator);
     $this->injectDependenciesIntoViewHelper($this->viewHelper);
     $this->viewHelper->initialize();
     $this->viewHelper->render();
 }