Refactored project structure.
This commit is contained in:
parent
cfe93434ad
commit
c015d8c58b
308 changed files with 39 additions and 47 deletions
48
tests/src/Helper/BuildInterpolatorTest.php
Normal file
48
tests/src/Helper/BuildInterpolatorTest.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace Tests\PHPCensor\Helper;
|
||||
|
||||
use PHPCensor\Helper\BuildInterpolator;
|
||||
|
||||
class BuildInterpolatorTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
/**
|
||||
* @var BuildInterpolator
|
||||
*/
|
||||
protected $testedInterpolator;
|
||||
|
||||
protected function setUp()
|
||||
{
|
||||
parent::setup();
|
||||
$this->testedInterpolator = new BuildInterpolator();
|
||||
}
|
||||
|
||||
public function testInterpolate_LeavesStringsUnchangedByDefault()
|
||||
{
|
||||
$string = "Hello World";
|
||||
$expectedOutput = "Hello World";
|
||||
|
||||
$actualOutput = $this->testedInterpolator->interpolate($string);
|
||||
|
||||
self::assertEquals($expectedOutput, $actualOutput);
|
||||
}
|
||||
|
||||
public function testInterpolate_LeavesStringsUnchangedWhenBuildIsSet()
|
||||
{
|
||||
$build = $this->prophesize('PHPCensor\\Model\\Build')->reveal();
|
||||
|
||||
$string = "Hello World";
|
||||
$expectedOutput = "Hello World";
|
||||
|
||||
$this->testedInterpolator->setupInterpolationVars(
|
||||
$build,
|
||||
"/buildpath/",
|
||||
"php-censor.local"
|
||||
);
|
||||
|
||||
$actualOutput = $this->testedInterpolator->interpolate($string);
|
||||
|
||||
self::assertEquals($expectedOutput, $actualOutput);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue