Exemplo n.º 1
0
 public function testInterpolate_LeavesStringsUnchangedWhenBuildIsSet()
 {
     $build = $this->prophesize('PHPCI\\Model\\Build')->reveal();
     $string = "Hello World";
     $expectedOutput = "Hello World";
     $this->testedInterpolator->setupInterpolationVars($build, "/buildpath/", "phpci.com");
     $actualOutput = $this->testedInterpolator->interpolate($string);
     $this->assertEquals($expectedOutput, $actualOutput);
 }
Exemplo n.º 2
0
 /**
  * Replace every occurrence of the interpolation vars in the given string
  * Example: "This is build %PHPCI_BUILD%" => "This is build 182"
  * @param string $input
  * @return string
  */
 public function interpolate($input)
 {
     return $this->interpolator->interpolate($input);
 }