public function setUp()
{
parent::setUp();
$valueResolverMock = $this->getMock('\\StackFormation\\ValueResolver\\ValueResolver', [], [], '', false);
$valueResolverMock->method('resolvePlaceholders')->willReturnCallback(function ($string) {
$string = str_replace('{env:FOO}', getenv('FOO'), $string);
$string = str_replace('{var:GlobalFoo}', 'GlobalBar', $string);
$string = str_replace('{env:VARWITHOUTVALUE:42}', '42', $string);
$string = str_replace('{var:BlueprintFoo}', 'BlueprintBar', $string);
return $string;
});
$sourceBlueprint = $this->getMock('\\StackFormation\\Blueprint', [], [], '', false);
$this->conditionalValueStage = new ConditionalValue($valueResolverMock, $sourceBlueprint, 'fooType', 'fooKey');
}