public function content()
 {
     $stubContent = file_get_contents($this->stubFilePath());
     $strSubstitutor = new StrSubstitutor(array('action' => $this->actionGenerator->getActionName()));
     return $strSubstitutor->replace($stubContent);
 }
 public function content()
 {
     $stubContent = file_get_contents($this->stubFilePath());
     $strSubstitutor = new StrSubstitutor(array('namespace' => $this->generator->getClassNamespace(), 'class' => $this->generator->getClassName()));
     return $strSubstitutor->replace($stubContent);
 }
예제 #3
0
 /**
  * @test
  */
 public function shouldReplaceWithSpaceInPlaceholderName()
 {
     //given
     $strSubstitutor = new StrSubstitutor(array('SOME PLACEHOLDER' => 'new value'));
     //when
     $substituted = $strSubstitutor->replace('Value: {{SOME PLACEHOLDER}}');
     //then
     $this->assertEquals('Value: new value', $substituted);
 }